summaryrefslogtreecommitdiff
path: root/compiler/GHC/Settings/IO.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-23 15:53:06 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-17 00:25:02 -0400
commitfb579e15c56994bc6c4cc266535024f20a81f830 (patch)
treecceee15e84d67bdbbe6eced0a4e89449a416bcc4 /compiler/GHC/Settings/IO.hs
parent8dfea0789957278b99bf302dfb24078fff84b6d2 (diff)
downloadhaskell-fb579e15c56994bc6c4cc266535024f20a81f830.tar.gz
driver: Introduce pgmcxx
Here we introduce proper support for compilation of C++ objects. This includes: * logic in `configure` to detect the C++ toolchain and propagating this information into the `settings` file * logic in the driver to use the C++ toolchain when compiling C++ sources
Diffstat (limited to 'compiler/GHC/Settings/IO.hs')
-rw-r--r--compiler/GHC/Settings/IO.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Settings/IO.hs b/compiler/GHC/Settings/IO.hs
index 308c5447e1..136607df27 100644
--- a/compiler/GHC/Settings/IO.hs
+++ b/compiler/GHC/Settings/IO.hs
@@ -78,6 +78,7 @@ initSettings top_dir = do
targetPlatformString <- getSetting "target platform string"
myExtraGccViaCFlags <- getSetting "GCC extra via C opts"
cc_prog <- getToolSetting "C compiler command"
+ cxx_prog <- getToolSetting "C++ compiler command"
cc_args_str <- getSetting "C compiler flags"
cxx_args_str <- getSetting "C++ compiler flags"
gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"
@@ -173,6 +174,7 @@ initSettings top_dir = do
, toolSettings_pgm_P = (cpp_prog, cpp_args)
, toolSettings_pgm_F = ""
, toolSettings_pgm_c = cc_prog
+ , toolSettings_pgm_cxx = cxx_prog
, toolSettings_pgm_a = (as_prog, as_args)
, toolSettings_pgm_l = (ld_prog, ld_args)
, toolSettings_pgm_lm = ld_r