diff options
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a123564984..76f6186443 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1381,7 +1381,8 @@ runPhase (RealPhase LlvmLlc) input_fn dflags ++ map SysTools.Option fpOpts ++ map SysTools.Option abiOpts ++ map SysTools.Option sseOpts - ++ map SysTools.Option avxOpts) + ++ map SysTools.Option avxOpts + ++ map SysTools.Option stackAlignOpts) return (RealPhase next_phase, output_fn) where @@ -1418,6 +1419,11 @@ runPhase (RealPhase LlvmLlc) input_fn dflags | isAvxEnabled dflags = ["-mattr=+avx"] | otherwise = [] + stackAlignOpts = + case platformArch (targetPlatform dflags) of + ArchX86_64 | isAvxEnabled dflags -> ["-stack-alignment=32"] + _ -> [] + ----------------------------------------------------------------------------- -- LlvmMangle phase |