Skip to content

Commit cc5f025

Browse files
Adding TODOs regarding more robust build proceedures [skip ci]
1 parent 6719dd9 commit cc5f025

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Cabal/Distribution/Simple/GHC.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,10 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
13521352
opts | needProfiling = profCxxOpts
13531353
| needDynamic = sharedCxxOpts
13541354
| otherwise = vanillaCxxOpts
1355+
-- TODO: Placing all Haskell, C, & C++ objects in a single directory
1356+
-- Has the potential for file collisions. In general we would
1357+
-- consider this a user error. However, we should strive to
1358+
-- add a warning if this occurs.
13551359
odir = fromFlag (ghcOptObjDir opts)
13561360
createDirectoryIfMissingVerbose verbosity True odir
13571361
needsRecomp <- checkNeedsRecompilation filename opts

Cabal/Distribution/Simple/PreProcess.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ ppC2hsExtras d = filter (\p -> takeExtensions p == ".chs.c") `fmap`
538538

539539
--TODO: perhaps use this with hsc2hs too
540540
--TODO: remove cc-options from cpphs for cabal-version: >= 1.10
541+
--TODO: Refactor and add seperate getCppOptionsForHs, getCppOptionsForCxx, & getCppOptionsForC
542+
-- instead of combining all these cases in a single function. This blind combination can
543+
-- potentially lead to compilation inconsistencies.
541544
getCppOptions :: BuildInfo -> LocalBuildInfo -> [String]
542545
getCppOptions bi lbi
543546
= platformDefines lbi

0 commit comments

Comments
 (0)