mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Build libSupport with -Werror=global-constructors (NFC)
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.
This commit is contained in:
parent
ecdc653aaa
commit
61041e8ca3
@ -1,5 +1,11 @@
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user