Lines Matching +full:libcxxabi +full:-

1 # See www/CMake.html for instructions on how to build libcxxabi with CMake.
21 project(libcxxabi CXX C)
23 set(PACKAGE_NAME libcxxabi)
26 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org")
52 option(LIBCXXABI_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
54 option(LIBCXXABI_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF)
150 if (LIBCXXABI_LIBCXX_PATH STREQUAL "LIBCXXABI_LIBCXX_PATH-NOTFOUND")
173 string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
192 # By default, for non-standalone builds, libcxx and libcxxabi share a library
230 add_target_flags_if(LIBCXXABI_BUILD_32_BITS "-m32")
232 "--target=${LIBCXXABI_TARGET_TRIPLE}")
234 "--gcc-toolchain=${LIBCXXABI_GCC_TOOLCHAIN}")
236 "--sysroot=${LIBCXXABI_SYSROOT}")
243 include(config-ix)
246 list(APPEND LIBCXXABI_COMPILE_FLAGS -nostdinc++)
247 # Remove -stdlib flags to prevent them from causing an unused flag warning.
248 string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
249 string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
253 list(APPEND LIBCXXABI_LINK_FLAGS "-rtlib=compiler-rt")
258 add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY)
262 add_definitions(-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
265 add_compile_flags_if_supported(-Werror=return-type)
268 add_compile_flags_if_supported(-W)
269 add_compile_flags_if_supported(-Wall)
270 add_compile_flags_if_supported(-Wchar-subscripts)
271 add_compile_flags_if_supported(-Wconversion)
272 add_compile_flags_if_supported(-Wmismatched-tags)
273 add_compile_flags_if_supported(-Wmissing-braces)
274 add_compile_flags_if_supported(-Wnewline-eof)
275 add_compile_flags_if_supported(-Wunused-function)
276 add_compile_flags_if_supported(-Wshadow)
277 add_compile_flags_if_supported(-Wshorten-64-to-32)
278 add_compile_flags_if_supported(-Wsign-compare)
279 add_compile_flags_if_supported(-Wsign-conversion)
280 add_compile_flags_if_supported(-Wstrict-aliasing=2)
281 add_compile_flags_if_supported(-Wstrict-overflow=4)
282 add_compile_flags_if_supported(-Wunused-parameter)
283 add_compile_flags_if_supported(-Wunused-variable)
284 add_compile_flags_if_supported(-Wwrite-strings)
285 add_compile_flags_if_supported(-Wundef)
288 add_compile_flags_if_supported(-Werror)
289 add_compile_flags_if_supported(-WX)
291 add_compile_flags_if_supported(-Wno-error)
292 add_compile_flags_if_supported(-WX-)
295 add_compile_flags_if_supported(-pedantic)
299 add_compile_flags_if_supported(-fstrict-aliasing)
305 add_compile_flags_if_supported(-EHsc)
307 add_c_compile_flags_if_supported(-funwind-tables)
309 add_definitions(-D_LIBCXXABI_NO_EXCEPTIONS)
310 add_compile_flags_if_supported(-fno-exceptions)
311 add_compile_flags_if_supported(-EHs-)
312 add_compile_flags_if_supported(-EHa-)
320 list(APPEND LIBCXXABI_COMPILE_FLAGS -D_DEBUG)
325 list(APPEND LIBCXXABI_COMPILE_FLAGS -UNDEBUG)
329 list(APPEND LIBCXXABI_COMPILE_FLAGS -DNDEBUG)
334 list(APPEND LIBCXXABI_COMPILE_FLAGS -D_LIBCPP_BUILD_STATIC)
354 add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
372 add_compile_flags_if_supported(-Wno-unused-command-line-argument)
373 add_compile_flags(-fno-modules)
386 list(APPEND LIBCXXABI_LINK_FLAGS "-undefined dynamic_lookup")
389 string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
394 add_definitions(-D_LIBCPP_HAS_THREAD_API_PTHREAD)
398 add_definitions(-D_LIBCPP_HAS_THREAD_API_EXTERNAL)
402 add_definitions(-D_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
406 add_definitions(-D_LIBCPP_DISABLE_EXTERN_TEMPLATE)
409 # pre-C++17.
410 add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS)
413 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
418 add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER)
422 add_definitions(-DLIBCXXABI_SILENT_TERMINATE)
426 add_definitions(-DLIBCXXABI_BAREMETAL)
457 if (LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND")
475 # replace the C++ runtime (with a non- standalone build).
478 "llvm/projects/libcxxabi ) and is built without "