summaryrefslogtreecommitdiff
path: root/compiler/main/GHC.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-07-29 19:34:57 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-06 17:38:32 -0400
commit3da872c3d250b47dd4ce00f96bea5936601571fd (patch)
treef5df7cabd02fa688aad6e50bbf7763a151cf0ac9 /compiler/main/GHC.hs
parent8039b6257ce5288e9e38c2593ff2d5d6d316efd4 (diff)
downloadhaskell-wip/llvm-config.tar.gz
Refactor, document, and optimize LLVM configuration loadingwip/llvm-config
As described in the new Note [LLVM Configuration] in SysTools, we now load llvm-targets and llvm-passes lazily to avoid the overhead of doing so when -fllvm isn't used (also known as "the common case"). Noticed in #17003. Metric Decrease: T12234 T12150
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r--compiler/main/GHC.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index f948f454a7..dc336e3914 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -505,7 +505,7 @@ initGhcMonad mb_top_dir
= do { env <- liftIO $
do { top_dir <- findTopDir mb_top_dir
; mySettings <- initSysTools top_dir
- ; myLlvmConfig <- initLlvmConfig top_dir
+ ; myLlvmConfig <- lazyInitLlvmConfig top_dir
; dflags <- initDynFlags (defaultDynFlags mySettings myLlvmConfig)
; checkBrokenTablesNextToCode dflags
; setUnsafeGlobalDynFlags dflags