Skip to content

Commit

Permalink
remove -Ofast, -ffast-math (#668)
Browse files Browse the repository at this point in the history
* remove -Ofast, -ffast-math

* removed clang-incompatible compiler flag.
  • Loading branch information
patrick-nicodemus authored Jun 7, 2024
1 parent 06943b0 commit c5e4d4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/owl/config/configure.ml
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,17 @@ let get_default_config c =
let cflags =
try clean_env_var "OWL_CFLAGS" with
| Not_found ->
[ (* Basic optimisation *) "-g"; "-O3"; "-Ofast" ]
[ (* Basic optimisation *) "-g"; "-O3" ]
@ (match arch, os with
| `arm64, `mac -> [ "-march=native" ]
| `x86_64, _ -> [ "-march=native"; "-mfpmath=sse"; "-msse2" ]
| _ -> [])
@ [ (* Experimental switches, -ffast-math may break IEEE754 semantics*)
"-funroll-loops"
; "-ffast-math"
; "-fno-math-errno"
; "-fno-rounding-math"
; "-fno-signaling-nans"
; "-fexcess-precision=fast"
; (* Configure Mersenne Twister RNG *)
"-DSFMT_MEXP=19937"
; "-fno-strict-aliasing"
Expand Down

0 comments on commit c5e4d4f

Please sign in to comment.