File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,13 @@ stdenv.mkDerivation (rec {
395
395
# We need to point at a stand in `windows.h` header file so that the RTS headers can
396
396
# work on the hostPlatform. We also need to work around case sensitve file system issues.
397
397
+ lib . optionalString stdenv . targetPlatform . isWindows ''
398
- export NIX_CFLAGS_COMPILE_${ stdenv . hostPlatform . config } +=" -I${ ../windows/include } "
398
+ export NIX_CFLAGS_COMPILE_${
399
+ # We want this only to apply to the non windows hostPlatform (the
400
+ # windows gcc cross compiler has a full `windows.h`).
401
+ # This matches the way `suffixSalt` is calculated in nixpkgs.
402
+ # See https://github.com/NixOS/nixpkgs/blob/8411006d6bcd7f6e6a8a1a80ce8fcdccdd16c6ab/pkgs/build-support/cc-wrapper/default.nix#L58
403
+ replaceStrings [ "-" "." ] [ "_" "_" ] stdenv . hostPlatform . config
404
+ } +=" -I${ ../windows/include } "
399
405
if [[ -f libraries/base/include/winio_structs.h ]]; then
400
406
substituteInPlace libraries/base/include/winio_structs.h --replace Windows.h windows.h
401
407
fi
You can’t perform that action at this time.
0 commit comments