From 78b0292bb16f82406d2d5eea154220417d0b31bd Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Tue, 4 Jun 2024 10:15:03 -0400 Subject: [PATCH] make: Fix `sed` command for LLVM libraries with no symbol versioning Previously this would return the `nm` output in its entirety, instead of correctly reporting '' as the LLVM symbol version. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 3463a0cf7a16b..00388ea0eadc4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -128,7 +128,7 @@ ifneq ($(USE_SYSTEM_LLVM),0) # USE_SYSTEM_LLVM != 0 CG_LLVMLINK += $(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --libs --system-libs) LLVM_SHLIB_SYMBOL_VERSION := $(shell nm -D --with-symbol-versions $(shell $(LLVM_CONFIG_HOST) --libfiles --link-shared | awk '{print $1; exit}') | \ - grep _ZN4llvm3Any6TypeId | head -n 1 | sed -e 's/.*@//') + grep _ZN4llvm3Any6TypeId | head -n 1 | sed -ne 's/.*@//p') # HACK: llvm-config doesn't correctly point to shared libs on all platforms # https://github.com/JuliaLang/julia/issues/29981