]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_cranelift/scripts/ext_config.sh
Rollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider
[rust.git] / compiler / rustc_codegen_cranelift / scripts / ext_config.sh
index 3f98d77d76cad82fe2d7546f64f7b0407b576de4..11d6c4c83186743f2751a2403c2996eab66746be 100644 (file)
@@ -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