File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
src/coreclr/debug/runtimeinfo Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ if(NOT WIN32 AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
5353
5454 if (NOT CLR_CMAKE_TARGET_APPLE AND (NOT CLR_CMAKE_TARGET_ANDROID OR CROSS_ROOTFS))
5555 locate_toolchain_exec(objdump CMAKE_OBJDUMP YES )
56+ locate_toolchain_exec(readelf CMAKE_READELF YES )
5657
5758 unset (CMAKE_OBJCOPY CACHE )
5859 locate_toolchain_exec(objcopy CMAKE_OBJCOPY NO )
Original file line number Diff line number Diff line change 55set -euo pipefail
66
77if [[ " $# " -lt 2 ]]; then
8- echo " Usage: genmoduleindex.sh ModuleBinaryFile IndexHeaderFile"
8+ echo " Usage: genmoduleindex.sh ModuleBinaryFile IndexHeaderFile readelfBinaryPath "
99 exit 1
1010fi
1111
@@ -25,16 +25,18 @@ function printIdAsBinary() {
2525
2626case " $( uname -s) " in
2727Darwin)
28- cmd=" dwarfdump -u $1 "
28+ cmd=" dwarfdump"
29+ arg=" -u"
2930 pattern=' ^UUID: ([0-9A-Fa-f\-]+)' ;;
3031* )
31- cmd=" readelf -n $1 "
32+ cmd=" $3 "
33+ arg=" -n"
3234 pattern=' ^[[:space:]]*Build ID: ([0-9A-Fa-f\-]+)' ;;
3335esac
3436
35- while read -r line; do
37+ " $cmd " " $arg " " $1 " | while read -r line; do
3638 if [[ " $line " =~ $pattern ]]; then
3739 printIdAsBinary " ${BASH_REMATCH[1]// -/ } "
3840 break
3941 fi
40- done < <( eval " $cmd " ) > " $2 "
42+ done > " $2 "
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function(generate_module_index Target ModuleIndexFile)
1515
1616 add_custom_command (
1717 OUTPUT ${ModuleIndexFile}
18- COMMAND ${CLR_ENG_NATIVE_DIR} /genmoduleindex${scriptExt} $<TARGET_FILE:${Target} > ${ModuleIndexFile}
18+ COMMAND ${CLR_ENG_NATIVE_DIR} /genmoduleindex${scriptExt} $<TARGET_FILE:${Target} > ${ModuleIndexFile} ${CMAKE_READELF}
1919 DEPENDS ${Target}
2020 COMMENT "Generating ${Target} module index file -> ${ModuleIndexFile} "
2121 )
You can’t perform that action at this time.
0 commit comments