-- we're in batch mode: finish the compilation pipeline.
_other -> do
let object_filename = ml_obj_file location
- object_dir = directoryOf object_filename
-
- -- create the object dir if it doesn't exist
- createDirectoryHierarchy object_dir
runPipeline (StopBefore Ln) ""
True Nothing output_fn (Just location)
getImportsFromFile input_fn
-- build a ModLocation to pass to hscMain.
- (mod, location') <- mkHomeModLocation mod_name "." basename suff
+ (mod, location') <- mkHomeModLocation mod_name (basename ++ '.':suff)
-- take -ohi into account if present
ohi <- readIORef v_Output_hi
verb <- getVerbFlag
- o2 <- readIORef v_minus_o2_for_C
- let opt_flag | o2 = "-O2"
- | otherwise = "-O"
-
pkg_extra_cc_opts <- getPackageExtraCcOpts pkgs
split_objs <- readIORef v_Split_object_files
++ (if cc_phase == HCc && mangle
then md_regd_c_flags
else [])
- ++ [ verb, "-S", "-Wimplicit", opt_flag ]
+ ++ [ verb, "-S", "-Wimplicit", "-O" ]
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ]
++ cc_opts
++ split_opt
output_fn <- get_output_fn Ln maybe_loc
+ -- we create directories for the object file, because it
+ -- might be a hierarchical module.
+ createDirectoryHierarchy (directoryOf output_fn)
+
SysTools.runAs (map SysTools.Option as_opts
++ [ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ]
++ [ SysTools.Option "-c"
++ pkg_framework_path_opts
++ pkg_framework_opts
#endif
- ++ if static && not no_hs_main then
- [ "-u", prefixUnderscore "Main_zdmain_closure"]
- else []))
+ ))
-- parallel only: move binary to another dir -- HWL
ways_ <- readIORef v_Ways