[libcxx-commits] [PATCH] D87243: [cmake] Centralize LLVM_ENABLE_WARNINGS option
Dave Lee via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 21 10:23:43 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb36bdfe5ca0c: [cmake] Centralize LLVM_ENABLE_WARNINGS option (authored by kastiglione).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87243/new/
https://reviews.llvm.org/D87243
Files:
clang/CMakeLists.txt
flang/CMakeLists.txt
libunwind/CMakeLists.txt
llvm/CMakeLists.txt
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/cmake/modules/LLVMConfig.cmake.in
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -105,10 +105,6 @@
# Avoid checking whether the compiler is working.
set(LLVM_COMPILER_CHECKED ON)
- # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions
- # resulting in unjustified successes by check_cxx_compiler_flag.
- set(LLVM_ENABLE_WARNINGS ON)
-
# Handle common options used by all runtimes.
include(AddLLVM)
include(HandleLLVMOptions)
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -36,6 +36,8 @@
set(LLVM_ABI_BREAKING_CHECKS @LLVM_ABI_BREAKING_CHECKS@)
+set(LLVM_ENABLE_WARNINGS @LLVM_ENABLE_WARNINGS@)
+
set(LLVM_ENABLE_EXPENSIVE_CHECKS @LLVM_ENABLE_EXPENSIVE_CHECKS@)
set(LLVM_ENABLE_ASSERTIONS @LLVM_ENABLE_ASSERTIONS@)
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -409,6 +409,8 @@
endif()
endif()
+option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
+
if( MSVC )
include(ChooseMSVCCRT)
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -399,7 +399,6 @@
list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
-option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." ON)
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -73,8 +73,6 @@
endif()
if (EXISTS ${LLVM_CMAKE_PATH})
- # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions.
- set(LLVM_ENABLE_WARNINGS ON)
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
include("${LLVM_CMAKE_PATH}/AddLLVM.cmake")
include("${LLVM_CMAKE_PATH}/HandleLLVMOptions.cmake")
Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -72,7 +72,6 @@
if(LLVM_ENABLE_ZLIB)
find_package(ZLIB REQUIRED)
endif()
- option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
if(CMAKE_COMPILER_IS_GNUCXX)
set(USE_NO_MAYBE_UNINITIALIZED 1)
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -105,7 +105,6 @@
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
endif()
- option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
option(LLVM_INSTALL_TOOLCHAIN_ONLY
"Only include toolchain files in the 'install' target." OFF)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87243.293213.patch
Type: text/x-patch
Size: 3241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200921/e585d86b/attachment-0001.bin>
More information about the libcxx-commits
mailing list