Skip to content

Commit 9ad85a3

Browse files
committed
fix: force usage of classic linker
1 parent e1aa4c0 commit 9ad85a3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

utils/build-apple-framework.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,22 @@ function build_host_hermesc {
4545

4646
# Utility function to configure an Apple framework
4747
function configure_apple_framework {
48-
local build_cli_tools
48+
local build_cli_tools xcode_15_flags xcode_major_version
4949

5050
if [[ $1 == macosx ]]; then
5151
build_cli_tools="true"
5252
else
5353
build_cli_tools="false"
5454
fi
5555

56+
xcode_15_flags=""
57+
xcode_major_version=$(xcodebuild -version | grep -oE '[0-9]*' | head -n 1)
58+
if [[ $xcode_major_version -ge 15 ]]; then
59+
xcode_15_flags="LINKER:-ld_classic"
60+
fi
61+
5662
cmake -S . -B "build_$1" -G "$BUILD_SYSTEM" \
63+
-DHERMES_EXTRA_LINKER_FLAGS="$xcode_15_flags" \
5764
-DHERMES_APPLE_TARGET_PLATFORM:STRING="$1" \
5865
-DCMAKE_OSX_ARCHITECTURES:STRING="$2" \
5966
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="$3" \

0 commit comments

Comments
 (0)