Skip to content
Snippets Groups Projects
Commit 1f71bcab authored by Mehdi Amini's avatar Mehdi Amini
Browse files

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.
parent ad8e75ca
No related branches found
No related tags found
No related merge requests found
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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment