Skip to content

Commit debaa73

Browse files
authored
make: Fix sed command for LLVM libraries with no symbol versioning (#54672)
If the LLVM library was built without symbol versioning, previously this would return the `nm` output in its entirety, instead of correctly reporting "" as the LLVM symbol version.
1 parent 65aeaf6 commit debaa73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ ifneq ($(USE_SYSTEM_LLVM),0)
128128
# USE_SYSTEM_LLVM != 0
129129
CG_LLVMLINK += $(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --libs --system-libs)
130130
LLVM_SHLIB_SYMBOL_VERSION := $(shell nm -D --with-symbol-versions $(shell $(LLVM_CONFIG_HOST) --libfiles --link-shared | awk '{print $1; exit}') | \
131-
grep _ZN4llvm3Any6TypeId | head -n 1 | sed -e 's/.*@//')
131+
grep _ZN4llvm3Any6TypeId | head -n 1 | sed -ne 's/.*@//p')
132132

133133
# HACK: llvm-config doesn't correctly point to shared libs on all platforms
134134
# https://github.com/JuliaLang/julia/issues/29981

0 commit comments

Comments
 (0)