summaryrefslogtreecommitdiff
path: root/ghc/compiler
diff options
context:
space:
mode:
authorLemmih <lemmih@gmail.com>2006-03-18 17:18:48 +0000
committerLemmih <lemmih@gmail.com>2006-03-18 17:18:48 +0000
commit5c67b7e313b2455ca65d5aa5970d86889145e97e (patch)
treead0a2d8107389ebf638f4ba7796505ba3142c9c0 /ghc/compiler
parent4a3042fcc68554ef59966430d2c6f1b70470d222 (diff)
downloadhaskell-5c67b7e313b2455ca65d5aa5970d86889145e97e.tar.gz
Don't generate stub files when -fno-code is given.
Diffstat (limited to 'ghc/compiler')
-rw-r--r--ghc/compiler/main/CodeOutput.lhs6
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc/compiler/main/CodeOutput.lhs b/ghc/compiler/main/CodeOutput.lhs
index 0148ca4343..8e4abbc968 100644
--- a/ghc/compiler/main/CodeOutput.lhs
+++ b/ghc/compiler/main/CodeOutput.lhs
@@ -61,7 +61,11 @@ codeOutput :: DynFlags
-> IO (Bool{-stub_h_exists-}, Bool{-stub_c_exists-})
codeOutput dflags this_mod location foreign_stubs pkg_deps flat_abstractC
- =
+ | HscNothing <- hscTarget dflags
+ -- We aren't interested in any code when HscNothing is our target.
+ = return (False, False)
+ | otherwise
+ =
-- You can have C (c_output) or assembly-language (ncg_output),
-- but not both. [Allowing for both gives a space leak on
-- flat_abstractC. WDP 94/10]