Skip to content

Commit 03931ce

Browse files
committed
Do not filter GHC flags
1 parent 4f50de3 commit 03931ce

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,14 @@ elaborateInstallPlan
22712271
, not (null args)
22722272
]
22732273
<> perPkgOptionMapMappend pkgid packageConfigProgramArgs
2274+
elabNormalisedProgramArgs =
2275+
Map.fromList
2276+
[ (programId prog, args)
2277+
| prog <- configuredPrograms compilerprogdb
2278+
, let args = programOverrideArgs $ addHaddockIfDocumentationEnabled prog
2279+
, not (null args)
2280+
]
2281+
<> perPkgOptionMapMappend pkgid packageConfigProgramArgs
22742282
elabProgramPathExtra = perPkgOptionNubList pkgid packageConfigProgramPathExtra
22752283
elabConfigureScriptArgs = perPkgOptionList pkgid packageConfigConfigureArgs
22762284
elabExtraLibDirs = perPkgOptionList pkgid packageConfigExtraLibDirs
@@ -4379,7 +4387,7 @@ packageHashConfigInputs shared@ElaboratedSharedConfig{..} pkg =
43794387
, pkgHashStripLibs = stripLibs
43804388
, pkgHashStripExes = stripExes
43814389
, pkgHashDebugInfo = withDebugInfo
4382-
, pkgHashProgramArgs = elabProgramArgs
4390+
, pkgHashProgramArgs = elabNormalisedProgramArgs
43834391
, pkgHashExtraLibDirs = elabExtraLibDirs
43844392
, pkgHashExtraLibDirsStatic = elabExtraLibDirsStatic
43854393
, pkgHashExtraFrameworkDirs = elabExtraFrameworkDirs

cabal-install/src/Distribution/Client/ProjectPlanning/Types.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ data ElaboratedConfiguredPackage = ElaboratedConfiguredPackage
275275
, elabDumpBuildInfo :: DumpBuildInfo
276276
, elabProgramPaths :: Map String FilePath
277277
, elabProgramArgs :: Map String [String]
278+
, elabNormalisedProgramArgs :: Map String [String]
278279
, elabProgramPathExtra :: [FilePath]
279280
, elabConfigureScriptArgs :: [String]
280281
, elabExtraLibDirs :: [FilePath]
@@ -345,7 +346,7 @@ normaliseConfiguredPackage
345346
-> ElaboratedConfiguredPackage
346347
-> ElaboratedConfiguredPackage
347348
normaliseConfiguredPackage ElaboratedSharedConfig{pkgConfigCompilerProgs} pkg =
348-
pkg{elabProgramArgs = Map.mapMaybeWithKey lookupFilter (elabProgramArgs pkg)}
349+
pkg{elabNormalisedProgramArgs = Map.mapMaybeWithKey lookupFilter (elabProgramArgs pkg)}
349350
where
350351
knownProgramDb = addKnownPrograms builtinPrograms pkgConfigCompilerProgs
351352

cabal-testsuite/PackageTests/CustomTestCoverage/cabal.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Build profile: -w ghc-<GHCVER> -O1
44
In order, the following will be built:
55
- plain-0.1.0.0 *test (first run)
66
Configuring plain-0.1.0.0...
7-
Preprocessing library for plain-0.1.0.0...
8-
Building library for plain-0.1.0.0...
9-
Preprocessing test suite 'test' for plain-0.1.0.0...
10-
Building test suite 'test' for plain-0.1.0.0...
7+
Preprocessing library for plain-0.1.0.0..
8+
Building library for plain-0.1.0.0..
9+
Preprocessing test suite 'test' for plain-0.1.0.0..
10+
Building test suite 'test' for plain-0.1.0.0..
1111
Running 1 test suites...
1212
Test suite test: RUNNING...
1313
Test suite test: PASS
14-
Test suite logged to: <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/test/plain-0.1.0.0-test.log
15-
Package coverage report written to <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/hpc/vanilla/html/hpc_index.html
14+
Test suite logged to: cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/test/plain-0.1.0.0-test.log
15+
Test coverage report written to cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/hpc/vanilla/html/test/hpc_index.html
1616
1 of 1 test suites (1 of 1 test cases) passed.
17-
Package coverage report written to <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/hpc/vanilla/html/hpc_index.html
17+
Package coverage report written to cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/plain-0.1.0.0/hpc/vanilla/html/plain-0.1.0.0/hpc_index.html

cabal-testsuite/PackageTests/Regression/T9640/cabal.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ In order, the following will be built:
77
- one-custom-0.1.0.0 (lib:one-custom) (requires build)
88
- depend-on-custom-with-exe-0.1.0.0 (lib) (first run)
99
Configuring one-custom-0.1.0.0...
10-
Preprocessing library for one-custom-0.1.0.0...
11-
Building library for one-custom-0.1.0.0...
10+
Preprocessing library for one-custom-0.1.0.0..
11+
Building library for one-custom-0.1.0.0..
1212
Installing library in <PATH>
1313
Warning: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options"
1414
Configuring library for depend-on-custom-with-exe-0.1.0.0...

0 commit comments

Comments
 (0)