diff options
author | David Terei <davidterei@gmail.com> | 2010-07-20 16:09:38 +0000 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2010-07-20 16:09:38 +0000 |
commit | 726cab79226c45945eb6e7f6ae9597a4e4f90f37 (patch) | |
tree | e9efe72a74391ac9003278ba1bc64bad239d6396 /compiler/main | |
parent | 46281d3a94f2598931de24d183060fb234c97759 (diff) | |
download | haskell-726cab79226c45945eb6e7f6ae9597a4e4f90f37.tar.gz |
LLVM: Decrease max opt level used under OSX to avoid bug
Currently, many programs compiled with GHC at -O2 and LLVM
set to -O3 will segfault (only under OSX). Until this issue
is fixed I have simply 'solved' the segfault by lowering
the max opt level for LLVM used to -O2 under OSX.
All these recent changes to OSX should mean its finally as
stable as Linux and Windows.
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 046e21ce5e..f56b122a18 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1286,7 +1286,11 @@ runPhase LlvmLlc _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc return (nphase, dflags, maybe_loc, output_fn) where +#if darwin_TARGET_OS + llvmOpts = ["-O1", "-O2", "-O2"] +#else llvmOpts = ["-O1", "-O2", "-O3"] +#endif ----------------------------------------------------------------------------- |