summaryrefslogtreecommitdiff
path: root/compiler/main/GhcMake.hs
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-03-07 14:32:07 +0100
committerBen Gamari <ben@smart-cactus.org>2016-03-07 14:32:09 +0100
commit5e2605e4e740d46014eaf3eb2b2b2e05a43bb8b2 (patch)
tree1ff9a4fddb5053216afb5ccccbb5e5059aca0019 /compiler/main/GhcMake.hs
parentade1a461ab4ba3e6de3c4afe9fe9766b7b4e51b3 (diff)
downloadhaskell-5e2605e4e740d46014eaf3eb2b2b2e05a43bb8b2.tar.gz
GhcMake: Clang/ASSERT fix
Test Plan: Build with clang Reviewers: thomie, rwbarton, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1977
Diffstat (limited to 'compiler/main/GhcMake.hs')
-rw-r--r--compiler/main/GhcMake.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 62321195f2..3655c0bb9f 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -367,10 +367,12 @@ load how_much = do
liftIO $ intermediateCleanTempFiles dflags mods_to_keep hsc_env1
-- there should be no Nothings where linkables should be, now
- ASSERT( isNoLink (ghcLink dflags)
+ let just_linkables =
+ isNoLink (ghcLink dflags)
|| all (isJust.hm_linkable)
(filter ((== HsSrcFile).mi_hsc_src.hm_iface)
- (eltsUFM hpt4))) do
+ (eltsUFM hpt4))
+ ASSERT( just_linkables ) do
-- Link everything together
linkresult <- liftIO $ link (ghcLink dflags) dflags False hpt4