diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-17 19:49:12 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-23 21:48:58 -0400 |
commit | 6948ffd398086f2da02397e1391c8f555c46f66f (patch) | |
tree | e8b624a3e4a1aa864ef0cbe5016d463b31633ee7 | |
parent | a4cfd500044617059d0cfbe804c6814151f7c7e4 (diff) | |
download | nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar.gz nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar.bz2 nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar.lz nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar.xz nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.tar.zst nixlib-6948ffd398086f2da02397e1391c8f555c46f66f.zip |
wasilibc: use .imports file for lld
instead of passing in the --allow-undefined-file, we can just let lld find the file.
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/wasilibc/default.nix | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index ddec3d0931ff..5f478c823e7a 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -301,8 +301,6 @@ stdenv.mkDerivation { + optionalString targetPlatform.isWasm '' hardening_unsupported_flags+=" stackprotector fortify pie pic" - '' + optionalString (targetPlatform.isWasm && libc != null) '' - echo "--allow-undefined-file=${libc}/share/wasm32-wasi/undefined-symbols.txt" >> $out/nix-support/cc-ldflags '' + optionalString (libc != null && targetPlatform.isAvr) '' diff --git a/pkgs/development/libraries/wasilibc/default.nix b/pkgs/development/libraries/wasilibc/default.nix index f783540797ce..229d67b81edd 100644 --- a/pkgs/development/libraries/wasilibc/default.nix +++ b/pkgs/development/libraries/wasilibc/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation { postInstall = '' mv $out/lib/*/* $out/lib + ln -s $out/share/wasm32-wasi/undefined-symbols.txt $out/lib/wasi.imports ''; meta = { |