diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-25 19:50:09 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-03 12:11:28 +0100 |
commit | 898cb090c8812704448ec4cb1c10d50df4b7d664 (patch) | |
tree | 526c5f4b47aee447d91af7ce83a819863f105804 /compiler/main/DynFlags.hs | |
parent | 58eaacc9967b7c627a66d49047fb447ac065706e (diff) | |
download | haskell-898cb090c8812704448ec4cb1c10d50df4b7d664.tar.gz |
Build the dynamic way by default on Linux/amd64
This required various build system changes to get the build to go
through.
In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs
to find their libraries. In the future, we might change the inplace tree
to be the same shape as an installed tree instead. However, this would
mean changing the way we do installation, as currently we use cabal's
installation methods to install the libraries, but that only works if
the libraries are under libraries/foo/dist-install/build/..., rather
than in inplace/lib/...
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r-- | compiler/main/DynFlags.hs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 97d0675802..6e51dcf4fa 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -339,6 +339,7 @@ data DynFlag | Opt_SccProfilingOn | Opt_Ticky | Opt_Static + | Opt_RPath | Opt_RelativeDynlibPaths | Opt_Hpc @@ -1160,7 +1161,7 @@ defaultDynFlags mySettings = dirsToClean = panic "defaultDynFlags: No dirsToClean", generatedDumps = panic "defaultDynFlags: No generatedDumps", haddockOptions = Nothing, - flags = IntSet.fromList (map fromEnum (defaultFlags (sTargetPlatform mySettings))), + flags = IntSet.fromList (map fromEnum (defaultFlags mySettings)), warningFlags = IntSet.fromList (map fromEnum standardWarnings), ghciScripts = [], language = Nothing, @@ -2273,7 +2274,8 @@ fFlags = [ ( "implicit-import-qualified", Opt_ImplicitImportQualified, nop ), ( "prof-count-entries", Opt_ProfCountEntries, nop ), ( "prof-cafs", Opt_AutoSccsOnIndividualCafs, nop ), - ( "hpc", Opt_Hpc, nop ) + ( "hpc", Opt_Hpc, nop ), + ( "use-rpaths", Opt_RPath, nop ) ] -- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@ @@ -2438,10 +2440,9 @@ xFlags = [ ( "PackageImports", Opt_PackageImports, nop ) ] -defaultFlags :: Platform -> [DynFlag] -defaultFlags platform +defaultFlags :: Settings -> [DynFlag] +defaultFlags settings = [ Opt_AutoLinkPackages, - Opt_Static, Opt_SharedImplib, @@ -2453,7 +2454,8 @@ defaultFlags platform Opt_GhciSandbox, Opt_GhciHistory, Opt_HelpfulErrors, - Opt_ProfCountEntries + Opt_ProfCountEntries, + Opt_RPath ] ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns] @@ -2466,6 +2468,12 @@ defaultFlags platform _ -> [] _ -> []) + ++ (if pc_dYNAMIC_BY_DEFAULT (sPlatformConstants settings) + then [] + else [Opt_Static]) + + where platform = sTargetPlatform settings + impliedFlags :: [(ExtensionFlag, TurnOnFlag, ExtensionFlag)] impliedFlags = [ (Opt_RankNTypes, turnOn, Opt_ExplicitForAll) |