summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2019-01-15 13:14:45 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-01-20 21:35:20 -0500
commitf035504b573b9684d53a6d035f8726672c1b0190 (patch)
tree5cc4037684d8967aa7b4808130cd9514d90a4501 /compiler
parent6e7aa5e937b18a45ee39c8c67b7a2f7350b89a66 (diff)
downloadhaskell-f035504b573b9684d53a6d035f8726672c1b0190.tar.gz
Add support for ASM foreign files (.s) in TH (#16180)
Diffstat (limited to 'compiler')
-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)