From 99d4076eedd9a60ca989959a61676d7cb0436386 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Mon, 2 Dec 2024 10:48:22 +0000 Subject: [PATCH] fix ld64 linker --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 032c7876..3e8ae5e3 100755 --- a/setup.sh +++ b/setup.sh @@ -65,7 +65,7 @@ sed -i'' -e 's/return !IsIteratorHelpersEnabled()/return false/' ./js/src/vm/Glo sed -i'' -e '/MOZ_CRASH_UNSAFE_PRINTF/,/__PRETTY_FUNCTION__);/d' ./mfbt/LinkedList.h # would crash in Debug Build: in `~LinkedList()` it should have removed all this list's elements before the list's destruction sed -i'' -e '/MOZ_ASSERT(stackRootPtr == nullptr);/d' ./js/src/vm/JSContext.cpp # would assert false in Debug Build since we extensively use `new JS::Rooted` sed -i'' -e 's|-id $(abspath $(libdir)|-id $(abspath @rpath|' ./js/src/build/Makefile.in # Set the `install_name` field of libmozjs dylib to use the RPATH instead of an absolute path -sed -i'' -e 's/-fuse-ld=ld/-ld64/' ./build/moz.configure/toolchain.configure # the classic linker can be explicitly requested using the `-ld64` flag. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking +sed -i'' -e 's/"-fuse-ld=ld"/"-ld64" if c_compiler.version >= "15.0" else "-fuse-ld=ld"/' ./build/moz.configure/toolchain.configure # XCode 15 changed the linker behaviour. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking cd js/src mkdir -p _build