[CodeGenPrepare] Drop nsw flags in `optimizeLoadExt` (#118180)
[llvm-project.git] / lldb / tools / intel-features / CMakeLists.txt
blob7d48491ec89ab2ceb2de60c2344b179abe6a78af
1 # Flags to control each individual feature
2 option(LLDB_BUILD_INTEL_MPX "Enable Building of Intel(R) Memory Protection Extensions" ON)
4 # Return if all features are OFF
5 if (NOT LLDB_BUILD_INTEL_MPX)
6   return()
7 endif()
9 LIST (APPEND FEATURE_LIBS "")
11 # Add feature specific subdirectories based on flags
12 if (LLDB_BUILD_INTEL_MPX AND CMAKE_SYSTEM_NAME MATCHES "Linux")
13   add_subdirectory(intel-mpx)
14   LIST (APPEND FEATURE_LIBS ${FEATURE_LIBS} lldbIntelMPX)
15   SET (CLI_WRAPPER_PREPROCESSORS "${CLI_WRAPPER_PREPROCESSORS} -DBUILD_INTEL_MPX")
16 endif()
18 if (NOT CLI_WRAPPER_PREPROCESSORS)
19   return()
20 endif()
22 set_source_files_properties(cli-wrapper.cpp PROPERTIES
23                             COMPILE_FLAGS ${CLI_WRAPPER_PREPROCESSORS})
25 add_lldb_library(lldbIntelFeatures SHARED
26   cli-wrapper.cpp
28   LINK_LIBS
29     ${FEATURE_LIBS}
30   )
32 install(TARGETS lldbIntelFeatures
33   LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})