X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=9ed55d71b03fe36289d51d6b58e4e6fd5d8632de;hb=6a944ae7fe1e8e2e456c68717188463263f8978f;hp=1d94b49763cd4dc678bda8d81366c483d2ee9ddf;hpb=8c84944d5782f2ee60d96c02977f15ba9e7ab935;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 1d94b49..9ed55d7 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -997,7 +997,7 @@ runPhase cc_phase _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc md_c_flags ++ pic_c_flags -#if defined(__PIC__) && defined(mingw32_HOST_OS) +#if defined(mingw32_TARGET_OS) -- Stub files generated for foreign exports references the runIO_closure -- and runNonIO_closure symbols, which are defined in the base package. -- These symbols are imported into the stub.c file via RtsAPI.h, and the @@ -1447,6 +1447,12 @@ linkBinary dflags o_files dep_packages = do ] ++ map SysTools.Option ( md_c_flags + +#ifdef mingw32_TARGET_OS + -- Permit the linker to auto link _symbol to _imp_symbol. + -- This lets us link against DLLs without needing an "import library". + ++ ["-Wl,--enable-auto-import"] +#endif ++ o_files ++ extra_ld_inputs ++ lib_path_opts @@ -1602,6 +1608,11 @@ linkDynLib dflags o_files dep_packages = do ++ map (SysTools.FileOption "") o_files ++ map SysTools.Option ( md_c_flags + + -- Permit the linker to auto link _symbol to _imp_symbol + -- This lets us link against DLLs without needing an "import library" + ++ ["-Wl,--enable-auto-import"] + ++ extra_ld_inputs ++ lib_path_opts ++ extra_ld_opts