Skip to content

Commit

Permalink
Discourage -fomit-frame-pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jul 14, 2023
1 parent 21a1c77 commit 1d17fab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr

function gcc_unsafe_flags!(p::AbstractPlatform, flags::Vector{String} = String[])
if !allow_unsafe_flags
return String["-Ofast", "-ffast-math", "-funsafe-math-optimizations"]
return String["-Ofast", "-ffast-math", "-funsafe-math-optimizations", "-fomit-frame-pointer"]
end
return String[]
end
Expand Down
2 changes: 1 addition & 1 deletion test/runners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ end
@test !run(ur, cmd, iobuff; tee_stream=devnull)
seekstart(iobuff)
lines = readlines(iobuff)
@test lines[2] == "BinaryBuilder: You used one or more of the unsafe flags: -Ofast, -ffast-math, -funsafe-math-optimizations"
@test lines[2] == "BinaryBuilder: You used one or more of the unsafe flags: -Ofast, -ffast-math, -funsafe-math-optimizations, -fomit-frame-pointer"
@test lines[3] == "Please repent."

ur = preferred_runner()(dir; platform=platform, allow_unsafe_flags=true)
Expand Down

0 comments on commit 1d17fab

Please sign in to comment.