Skip to content

[cmake] Centralize LLVM_ENABLE_WARNINGS option #1991

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

Conversation

kastiglione
Copy link

Configure default value of LLVM_ENABLE_WARNINGS in HandleLLVMOptions.cmake.

LLVM_ENABLE_WARNINGS is documented as ON by default, but HandleLLVMOptions assumes the default has been set somewhere else. If it has not been explicitly set, then HandleLLVMOptions implicitly uses OFF as a default.

This removes the various option() declarations in favor of a single declaration in HandleLLVMOptions. This will prevent the unwanted use of -w that is mentioned in a couple of the comments.

Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd

Differential Revision: https://reviews.llvm.org/D87243

(cherry picked from commit b36bdfe)

Configure default value of `LLVM_ENABLE_WARNINGS` in `HandleLLVMOptions.cmake`.

`LLVM_ENABLE_WARNINGS` is documented as ON by default, but `HandleLLVMOptions` assumes the default has been set somewhere else. If it has not been explicitly set, then `HandleLLVMOptions` implicitly uses OFF as a default.

This removes the various `option()` declarations in favor of a single declaration in `HandleLLVMOptions`. This will prevent the unwanted use of `-w` that is mentioned in a couple of the comments.

Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd

Differential Revision: https://reviews.llvm.org/D87243

(cherry picked from commit b36bdfe)
@kastiglione
Copy link
Author

This will re-enable warnings when building swift-lldb.

@kastiglione
Copy link
Author

@swift-ci test macOS Platform

@kastiglione kastiglione merged commit e509ca5 into apple/stable/20200714 Oct 17, 2020
@kastiglione kastiglione deleted the cmake-Centralize-LLVM_ENABLE_WARNINGS-option branch October 17, 2020 18:40
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.

2 participants