From 8de3b1fb481960857fff1d55d5e1862f7cf39fca Mon Sep 17 00:00:00 2001 From: Luc Vieillescazes Date: Thu, 4 Apr 2024 17:06:21 +0200 Subject: [PATCH] Fix compilation on macOs (#2613) --- compile_rust.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compile_rust.sh b/compile_rust.sh index 5edac7c42c..72abb864e3 100755 --- a/compile_rust.sh +++ b/compile_rust.sh @@ -9,4 +9,10 @@ if test -n "$SHARED"; then RUSTFLAGS="$RUSTFLAGS --cfg php_shared_build" fi +case "${host_os}" in + darwin*) + RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"; + ;; +esac + RUSTFLAGS="$RUSTFLAGS" RUSTC_BOOTSTRAP=1 "${DDTRACE_CARGO:-cargo}" build $(test "${PROFILE:-debug}" = "debug" || echo --profile "$PROFILE") "$@"