Skip to content

Address TODO to unblock master-next. #505

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

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

pschuh
Copy link
Contributor

@pschuh pschuh commented Jul 16, 2019

For reference, this is a build that fails: https://ci.swift.org/view/swift-master-next/job/oss-swift-incremental-RA-linux-ubuntu-16_04-master-next/11406/console
It repeatedly complains about "-momit-leaf-frame-pointer" being unused.

PRIVATE
-fblocks
-momit-leaf-frame-pointer)
check_c_compiler_flag("-momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
Copy link
Member

Choose a reason for hiding this comment

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

-Werror -Wall -O3 is not required when using check_c_compiler_flag. See the documentation at https://cmake.org/cmake/help/latest/module/CheckCCompilerFlag.html.

I think that we should just do two target_compile_options calls here.

check_c_compile_flag("-momit-leaf-frame-pointer" CC_SUPPORTS_MOMIT_LEAF_FRAME_POINTER)
target_compile_options(dispatch PRIVATE -fblocks)
if(CC_SUPPORTS_MOMIT_LEAF_FRAME_POINTER)
  target_compile_options(dispatch PRIVATE -momit-leaf-frame-pointer)
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

check_c_compiler_flag just runs the compilation command with the provided flag. Unfortunately, clang will only complain with this combination of flags.

Copy link
Member

Choose a reason for hiding this comment

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

Blah, that is annoying.

@compnerd
Copy link
Member

@pschuh - thanks for this patch and for the quick turn-around on the review!

@compnerd
Copy link
Member

@swift-ci please test Linux platform

@compnerd compnerd merged commit 6d32c4d into swiftlang:master Jul 17, 2019
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
Address TODO to unblock master-next.

Signed-off-by: Kim Topley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants