diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2020-10-16 16:23:03 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2020-10-16 16:23:03 +0800 |
commit | e9f7e561ed4c2edc2b042108b16ced470e272a96 (patch) | |
tree | b830eeb03cdd19729c03ee376e3ce52fd4733c52 | |
parent | 5f1ce1fe723ff51bac578fc057c9b2158b55cdcc (diff) | |
download | haskell-e9f7e561ed4c2edc2b042108b16ced470e272a96.tar.gz |
[DWARF] Enable only on elf platforms
-rw-r--r-- | compiler/GHC/CmmToAsm.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 7089cf8a07..0c8db9e7f3 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -1184,7 +1184,7 @@ initNCGConfig dflags = NCGConfig ArchX86 -> v _ -> Nothing - , ncgDwarfEnabled = debugLevel dflags > 0 - , ncgDwarfUnwindings = debugLevel dflags >= 1 - , ncgDwarfStripBlockInfo = debugLevel dflags < 2 -- We strip out block information when running with -g0 or -g1. + , ncgDwarfEnabled = osElfTarget (platformOS (targetPlatform dflags)) && debugLevel dflags > 0 + , ncgDwarfUnwindings = osElfTarget (platformOS (targetPlatform dflags)) && debugLevel dflags >= 1 + , ncgDwarfStripBlockInfo = osElfTarget (platformOS (targetPlatform dflags)) && debugLevel dflags < 2 -- We strip out block information when running with -g0 or -g1. } |