about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/scripts/ext_config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_cranelift/scripts/ext_config.sh')
-rw-r--r--compiler/rustc_codegen_cranelift/scripts/ext_config.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/ext_config.sh b/compiler/rustc_codegen_cranelift/scripts/ext_config.sh
index 3f98d77d76c..11d6c4c8318 100644
--- a/compiler/rustc_codegen_cranelift/scripts/ext_config.sh
+++ b/compiler/rustc_codegen_cranelift/scripts/ext_config.sh
@@ -1,6 +1,6 @@
 # Note to people running shellcheck: this file should only be sourced, not executed directly.
 
-# Various env vars that should only be set for the build system but not for cargo.sh
+# Various env vars that should only be set for the build system
 
 set -e
 
@@ -25,3 +25,8 @@ if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
       echo "Unknown non-native platform"
    fi
 fi
+
+# FIXME fix `#[linkage = "extern_weak"]` without this
+if [[ "$(uname)" == 'Darwin' ]]; then
+   export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
+fi