diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-05-05 08:30:19 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-05-05 08:30:19 +0200 |
commit | 1dc36904d8cefa8188c785efd03274637c838e31 (patch) | |
tree | 0cf37f0803f1e9c6985d09f2870e5ec61229d2ca /pkgs/stdenv | |
parent | 75f1cc61b86b002f551529f1cafa30b4f4010bd9 (diff) | |
parent | 7a005601d48f760864258e369364b3b847d4e9fd (diff) | |
download | nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.gz nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.bz2 nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.lz nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.xz nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.zst nixlib-1dc36904d8cefa8188c785efd03274637c838e31.zip |
Merge #14920: windows improvements, mainly mingw
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/adapters.nix | 8 | ||||
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 87d3938f13d3..0b6707bf8b16 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -96,8 +96,12 @@ rec { name = name + "-" + cross.config; nativeBuildInputs = nativeBuildInputsDrvs ++ nativeInputsFromBuildInputs - ++ [ gccCross binutilsCross ] ++ - stdenv.lib.optional selfNativeBuildInput nativeDrv; + ++ [ gccCross binutilsCross ] + ++ stdenv.lib.optional selfNativeBuildInput nativeDrv + # without proper `file` command, libtool sometimes fails + # to recognize 64-bit DLLs + ++ stdenv.lib.optional (cross.config == "x86_64-w64-mingw32") pkgs.file + ; # Cross-linking dynamic libraries, every buildInput should # be propagated because ld needs the -rpath-link to find diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index a51289fa9019..b2891030728f 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -196,7 +196,13 @@ let buildInputs = if crossConfig != null then buildInputs' else []; propagatedBuildInputs = if crossConfig != null then propagatedBuildInputs else []; # Inputs built by the usual native compiler. - nativeBuildInputs = nativeBuildInputs ++ (if crossConfig == null then buildInputs' else []); + nativeBuildInputs = nativeBuildInputs + ++ lib.optionals (crossConfig == null) buildInputs' + ++ lib.optional + (result.isCygwin + || (crossConfig != null && lib.hasSuffix "mingw32" crossConfig)) + ../../build-support/setup-hooks/win-dll-link.sh + ; propagatedNativeBuildInputs = propagatedNativeBuildInputs ++ (if crossConfig == null then propagatedBuildInputs else []); } // ifDarwin { |