[llvm] 2bad8bd - Revert "Build libSupport with -Werror=global-constructors (NFC)"

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 15:47:19 PDT 2021


Author: Mehdi Amini
Date: 2021-07-16T22:47:04Z
New Revision: 2bad8bd08924146b3c28513938cc9e7c325c620c

URL: https://github.com/llvm/llvm-project/commit/2bad8bd08924146b3c28513938cc9e7c325c620c
DIFF: https://github.com/llvm/llvm-project/commit/2bad8bd08924146b3c28513938cc9e7c325c620c.diff

LOG: Revert "Build libSupport with -Werror=global-constructors (NFC)"

This reverts commit 1f71bcabb77df482cc0dc7bab90a73e15f3e347b.

Some platform have global destructors for std::mutex that still
needs to be fixed.

Added: 
    

Modified: 
    llvm/lib/Support/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 57058c6704e01..2242b0ec60abc 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