Commit aafa9add authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Extract gmpLibs from integer-gmp.buildinfo directly.

See #159, #206.
parent cc102887
......@@ -12,6 +12,9 @@ import Settings
import Settings.Builders.GhcCabal (bootPackageDbArgs)
import Settings.Builders.Common (cIncludeArgs)
buildInfoPath :: FilePath
buildInfoPath = pkgPath integerGmp -/- "integer-gmp.buildinfo"
-- TODO: add support for -dyno
-- $1/$2/build/%.$$($3_o-bootsuf) : $1/$4/%.hs-boot
-- $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
......@@ -28,7 +31,12 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
buildProg = not (buildObj || buildHi)
libs <- getPkgDataList DepExtraLibs
gmpLibs <- if stage > Stage0 && buildProg
then words <$> getSetting GmpLibDir
then do -- TODO: get this data more gracefully
buildInfo <- lift $ readFileLines buildInfoPath
let extract s = case stripPrefix "extra-libraries: " s of
Nothing -> []
Just value -> words value
return $ concatMap extract buildInfo
else return []
libDirs <- getPkgDataList DepLibDirs
mconcat [ commonGhcArgs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment