[clang][bytecode] Fix reporting failed local constexpr initializers (#123588)
[llvm-project.git] / llvm / lib / TargetParser / CMakeLists.txt
blob8ec32f741056662c973e45089bcaacb6bb0c9211
1 # Ensure that libLLVMTargetParser does not carry any static global initializer.
2 # ManagedStatic can be used to enable lazy-initialization of globals.
4 # HAS_WERROR_GLOBAL_CTORS and LLVM_HAS_NOGLOBAL_CTOR_MUTEX should have been set
5 # by llvm/lib/Support/CMakeLists.txt (which provides the required Support
6 # dependency).
7 if (HAS_WERROR_GLOBAL_CTORS AND NOT LLVM_HAS_NOGLOBAL_CTOR_MUTEX)
8   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=global-constructors")
9 endif()
11 # Solaris code uses kstat, so specify dependency explicitly for shared builds.
12 if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
13   set(system_libs kstat)
14 endif()
16 add_llvm_component_library(LLVMTargetParser
17   AArch64TargetParser.cpp
18   ARMTargetParserCommon.cpp
19   ARMTargetParser.cpp
20   CSKYTargetParser.cpp
21   Host.cpp
22   LoongArchTargetParser.cpp
23   PPCTargetParser.cpp
24   RISCVISAInfo.cpp
25   RISCVTargetParser.cpp
26   SubtargetFeature.cpp
27   TargetParser.cpp
28   Triple.cpp
29   X86TargetParser.cpp
31   ADDITIONAL_HEADER_DIRS
32   Unix
33   Windows
35   LINK_LIBS
36   ${system_libs}
38   LINK_COMPONENTS
39   Support
41   DEPENDS
42   ARMTargetParserTableGen
43   AArch64TargetParserTableGen
44   RISCVTargetParserTableGen
45   )