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 ParserCoreUtils ( getCoreModuleName )
import SrcLoc ( unLoc )
import SrcLoc ( Located(..) )
+import FastString
import Control.Exception as Exception
import Data.IORef ( readIORef, writeIORef, IORef )
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 = [ ]
else [])
++ [ verb, "-S", "-Wimplicit", cc_opt ]
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ]
+#ifdef darwin_TARGET_OS
+ ++ framework_paths
+#endif
++ cc_opts
++ split_opt
++ include_paths
-- 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