projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not #include external header files when compiling via C
[ghc-hetmet.git]
/
compiler
/
main
/
DriverPipeline.hs
diff --git
a/compiler/main/DriverPipeline.hs
b/compiler/main/DriverPipeline.hs
index
39feb18
..
59535f0
100644
(file)
--- a/
compiler/main/DriverPipeline.hs
+++ b/
compiler/main/DriverPipeline.hs
@@
-32,7
+32,7
@@
import Finder
import HscTypes
import Outputable
import Module
import HscTypes
import Outputable
import Module
-import UniqFM ( eltsUFM )
+import LazyUniqFM ( eltsUFM )
import ErrUtils
import DynFlags
import StaticFlags ( v_Ld_inputs, opt_Static, WayName(..) )
import ErrUtils
import DynFlags
import StaticFlags ( v_Ld_inputs, opt_Static, WayName(..) )
@@
-45,6
+45,7
@@
import Maybes ( expectJust )
import ParserCoreUtils ( getCoreModuleName )
import SrcLoc ( unLoc )
import SrcLoc ( Located(..) )
import ParserCoreUtils ( getCoreModuleName )
import SrcLoc ( unLoc )
import SrcLoc ( Located(..) )
+import FastString
import Control.Exception as Exception
import Data.IORef ( readIORef, writeIORef, IORef )
import Control.Exception as Exception
import Data.IORef ( readIORef, writeIORef, IORef )
@@
-835,6
+836,13
@@
runPhase cc_phase _stop dflags _basename _suff input_fn get_output_fn maybe_loc
pkg_extra_cc_opts <- getPackageExtraCcOpts dflags pkgs
pkg_extra_cc_opts <- getPackageExtraCcOpts dflags pkgs
+#ifdef darwin_TARGET_OS
+ pkg_framework_paths <- getPackageFrameworkPath dflags pkgs
+ let cmdline_framework_paths = frameworkPaths dflags
+ let framework_paths = map ("-F"++)
+ (cmdline_framework_paths ++ pkg_framework_paths)
+#endif
+
let split_objs = dopt Opt_SplitObjs dflags
split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ]
| otherwise = [ ]
let split_objs = dopt Opt_SplitObjs dflags
split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ]
| otherwise = [ ]
@@
-907,6
+915,9
@@
runPhase cc_phase _stop dflags _basename _suff input_fn get_output_fn maybe_loc
else [])
++ [ verb, "-S", "-Wimplicit", cc_opt ]
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ]
else [])
++ [ verb, "-S", "-Wimplicit", cc_opt ]
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ]
+#ifdef darwin_TARGET_OS
+ ++ framework_paths
+#endif
++ cc_opts
++ split_opt
++ include_paths
++ cc_opts
++ split_opt
++ include_paths
@@
-1097,8
+1108,8
@@
runPhase_MoveBinary dflags input_fn dep_packages
case (dynLibLoader dflags) of
Wrapped wrapmode ->
do
case (dynLibLoader dflags) of
Wrapped wrapmode ->
do
- let (o_base, o_ext) = splitFilename input_fn
- let wrapped_executable | o_ext == "exe" = (o_base ++ "_real") `joinFileExt` o_ext
+ let (o_base, o_ext) = splitExtension input_fn
+ let wrapped_executable | o_ext == "exe" = (o_base ++ "_real") <.> o_ext
| otherwise = input_fn ++ "_real"
behaviour <- wrapper_behaviour dflags wrapmode dep_packages
| otherwise = input_fn ++ "_real"
behaviour <- wrapper_behaviour dflags wrapmode dep_packages
@@
-1615,6
+1626,5
@@
hscMaybeAdjustTarget dflags stop _ current_hsc_lang
-- otherwise, stick to the plan
| otherwise = current_hsc_lang
-- otherwise, stick to the plan
| otherwise = current_hsc_lang
-v_Split_info :: IORef (String, Int)
GLOBAL_VAR(v_Split_info, ("",0), (String,Int))
-- The split prefix and number of files
GLOBAL_VAR(v_Split_info, ("",0), (String,Int))
-- The split prefix and number of files