From 0e879db58a00674e749add13dd0cf591ec7df2f2 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 16 Jan 2024 16:36:22 +0100 Subject: [PATCH] Workaround bug in XCode 14.2 linker not respecting RTLD_LAZY * See https://github.com/oracle/truffleruby/issues/3390 --- dist/index.js | 6 ++++++ ruby-builder.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dist/index.js b/dist/index.js index 775c7e749..7ba39dc9c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -65011,6 +65011,12 @@ async function install(platform, engine, version) { } } + // https://github.com/oracle/truffleruby/issues/3390 + if (engine.startsWith('truffleruby') && common.floatVersion(version) >= 24.0 && !common.isSelfHostedRunner() && common.getOSNameVersionArch() === 'macos-12-x64') { + console.log('Setting MACOSX_DEPLOYMENT_TARGET=11.0 to workaround bug in XCode 14.2 linker not respecting RTLD_LAZY, see https://github.com/oracle/truffleruby/issues/3390') + core.exportVariable('MACOSX_DEPLOYMENT_TARGET', '11.0') + } + return rubyPrefix } diff --git a/ruby-builder.js b/ruby-builder.js index b71483aa0..35148f563 100644 --- a/ruby-builder.js +++ b/ruby-builder.js @@ -58,6 +58,12 @@ export async function install(platform, engine, version) { } } + // https://github.com/oracle/truffleruby/issues/3390 + if (engine.startsWith('truffleruby') && common.floatVersion(version) >= 24.0 && !common.isSelfHostedRunner() && common.getOSNameVersionArch() === 'macos-12-x64') { + console.log('Setting MACOSX_DEPLOYMENT_TARGET=11.0 to workaround bug in XCode 14.2 linker not respecting RTLD_LAZY, see https://github.com/oracle/truffleruby/issues/3390') + core.exportVariable('MACOSX_DEPLOYMENT_TARGET', '11.0') + } + return rubyPrefix }