gcc: Only use strip -x if building libgccjit on darwin

It's not necessary to use strip -x otherwise, so let's just use it for
the JIT library.
This commit is contained in:
Andreas Fuchs 2020-08-27 12:38:31 -04:00
parent a891ae41b3
commit 41e34e76d8
2 changed files with 7 additions and 6 deletions

View File

@ -181,7 +181,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix { preConfigure = import ../common/pre-configure.nix {
inherit (stdenv) lib; inherit (stdenv) lib;
inherit version hostPlatform gnatboot langAda langGo; inherit version hostPlatform gnatboot langAda langGo langJit;
}; };
dontDisableStatic = true; dontDisableStatic = true;

View File

@ -2,6 +2,7 @@
, gnatboot ? null , gnatboot ? null
, langAda ? false , langAda ? false
, langJava ? false , langJava ? false
, langJit ? false
, langGo }: , langGo }:
assert langJava -> lib.versionOlder version "7"; assert langJava -> lib.versionOlder version "7";
@ -50,10 +51,10 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
export ac_cv_func_aligned_alloc=no export ac_cv_func_aligned_alloc=no
'' ''
# In order to properly install on macOS Catalina, strip(1) upon # In order to properly install libgccjit on macOS Catalina, strip(1)
# installation must not remove external symbols, otherwise the install # upon installation must not remove external symbols, otherwise the
# step errors with "symbols referenced by indirect symbol table # install step errors with "symbols referenced by indirect symbol
# entries that can't be stripped". # table entries that can't be stripped".
+ lib.optionalString (hostPlatform.isDarwin) '' + lib.optionalString (hostPlatform.isDarwin && langJit) ''
export STRIP='strip -x' export STRIP='strip -x'
'' ''