Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed clang -Ofast issue. #9409

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ endif()
if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC)
set(OPT_FLAGS_RELEASE "-O2")
else()
set(OPT_FLAGS_RELEASE "-Ofast")
set(OPT_FLAGS_RELEASE "-O3")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang recommends to replace -Ofast with -O3 -ffast-math:

Users are advised to switch to -O3 -ffast-math if the use of non-standard math behavior is intended, and -O3 otherwise.

I don't think this PR should change the current behavior which enables fast math.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang recommends to replace -Ofast with -O3 -ffast-math:

Users are advised to switch to -O3 -ffast-math if the use of non-standard math behavior is intended, and -O3 otherwise.

I don't think this PR should change the current behavior which enables fast math.

I see, I noticed that there is a conflicting opinion between SChernykh and 0xFFFC0000.

As of now, I have removed the lines as suggested by 0xFFFC0000. Should I add the flag -ffast-math instead?

endif()

# BUILD_TAG is used to select the build type to check for a new version
Expand Down