summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2019-01-15 13:14:45 +0100
committerBen Gamari <ben@smart-cactus.org>2019-02-20 14:28:54 -0500
commitb3ee7e330f7a98de36130f356bf32b95bc28859c (patch)
tree60d65257990dbc1f6d7ee44beba72b23ded2f869 /compiler/main
parentf9bd1cfe10fd14a2718dde2e06e1836f95d55e4b (diff)
downloadhaskell-b3ee7e330f7a98de36130f356bf32b95bc28859c.tar.gz
Add support for ASM foreign files (.s) in TH (#16180)
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DriverPipeline.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index f1a5cb46e0..5fe2362973 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -306,11 +306,12 @@ compileForeign :: HscEnv -> ForeignSrcLang -> FilePath -> IO FilePath
compileForeign _ RawObject object_file = return object_file
compileForeign hsc_env lang stub_c = do
let phase = case lang of
- LangC -> Cc
- LangCxx -> Ccxx
- LangObjc -> Cobjc
+ LangC -> Cc
+ LangCxx -> Ccxx
+ LangObjc -> Cobjc
LangObjcxx -> Cobjcxx
- RawObject -> panic "compileForeign: should be unreachable"
+ LangAsm -> As True -- allow CPP
+ RawObject -> panic "compileForeign: should be unreachable"
(_, stub_o) <- runPipeline StopLn hsc_env
(stub_c, Just (RealPhase phase))
Nothing (Temporary TFL_GhcSession)