ghc: provide JavaScript CPP command for ghcjs build (#456260)

This commit is contained in:
Alexandre Esteves
2025-10-31 16:07:17 +00:00
committed by GitHub

View File

@@ -859,6 +859,12 @@ stdenv.mkDerivation (
ghc-settings-edit "$settingsFile" \ ghc-settings-edit "$settingsFile" \
"windres command" "${toolPath "windres" installCC}" "windres command" "${toolPath "windres" installCC}"
'' ''
+ lib.optionalString (stdenv.targetPlatform.isGhcjs && lib.versionOlder version "9.12") ''
ghc-settings-edit "$settingsFile" \
"JavaScript CPP command" "${toolPath "cc" installCC}"
ghc-settings-edit "$settingsFile" \
"JavaScript CPP flags" "-E -CC -Wno-unicode -nostdinc"
''
+ '' + ''
# Install the bash completion file. # Install the bash completion file.