[llvm] df7d9c8 - Revert "Build libSupport with -Werror=global-constructors (NFC)"
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 25 17:56:18 PDT 2021
Author: Mehdi Amini
Date: 2021-07-26T00:55:36Z
New Revision: df7d9c8cb03c06a0346acb99f96c4c7069e105bc
URL: https://github.com/llvm/llvm-project/commit/df7d9c8cb03c06a0346acb99f96c4c7069e105bc
DIFF: https://github.com/llvm/llvm-project/commit/df7d9c8cb03c06a0346acb99f96c4c7069e105bc.diff
LOG: Revert "Build libSupport with -Werror=global-constructors (NFC)"
This reverts commit 5eb2e9aa64b7be7cd8ed7f36de19c2c9bdf1977c.
This broke MacOS builds, needs to have a safer check guarding the flag
addition.
Added:
Modified:
llvm/lib/Support/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 57058c6704e0..2242b0ec60ab 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -1,11 +1,5 @@
include(GetLibraryName)
-# Ensure that libSupport does not carry any static global initializer.
-# libSupport can be embedded in use cases where we don't want to load all
-# cl::opt unless we want to parse the command line.
-# ManagedStatic can be used to enable lazy-initialization of globals.
-add_flag_if_supported("-Werror=global-constructors" WERROR_GLOBAL_CONSTRUCTOR)
-
if(LLVM_ENABLE_ZLIB)
set(imported_libs ZLIB::ZLIB)
endif()
More information about the llvm-commits
mailing list