diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-06-04 18:04:04 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-06-04 18:04:04 -0400 |
commit | 514e7bf8a6e6c9f01d3ac3d0d582296af3fd31f1 (patch) | |
tree | a45e7414af8bd7f69b42d278f71b86c11a25ff35 | |
parent | 5fccdfad28eb2679c2ce65b48b5cbcdc25887266 (diff) | |
parent | 07131494e77f4c985c2cef369238dc8e83a98a90 (diff) | |
download | haskell-514e7bf8a6e6c9f01d3ac3d0d582296af3fd31f1.tar.gz |
Merge branch 'cherry-pick-e172a6d1' of gitlab.haskell.org:ghc/ghc into wip/ghc-8.8-merges
-rw-r--r-- | compiler/main/DriverPipeline.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 8ffeb5e908..5d3dbafdbb 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -273,16 +273,23 @@ compileOne' m_tc_result mHscMessage then gopt_set dflags0 Opt_BuildDynamicToo else dflags0 + -- #16331 - when no "internal interpreter" is available but we + -- need to process some TemplateHaskell or QuasiQuotes, we automatically + -- turn on -fexternal-interpreter. + dflags2 = if not internalInterpreter && needsLinker + then gopt_set dflags1 Opt_ExternalInterpreter + else dflags1 + basename = dropExtension input_fn -- We add the directory in which the .hs files resides) to the import -- path. This is needed when we try to compile the .hc file later, if it -- imports a _stub.h file that we created here. current_dir = takeDirectory basename - old_paths = includePaths dflags1 + old_paths = includePaths dflags2 !prevailing_dflags = hsc_dflags hsc_env0 dflags = - dflags1 { includePaths = addQuoteInclude old_paths [current_dir] + dflags2 { includePaths = addQuoteInclude old_paths [current_dir] , log_action = log_action prevailing_dflags } -- use the prevailing log_action / log_finaliser, -- not the one cached in the summary. This is so |