Lines Matching +full:docs +full:- +full:libunwind +full:- +full:html
33 message(STATUS "Configuring for clang-cl")
47 # Basic options ---------------------------------------------------------------
94 be useful when porting to platforms that don't support UTF-8 encoding (e.g.
130 to provide compile-time errors when using features unavailable on some version of
135 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
137 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-mingw.cfg.in")
138 elseif(WIN32) # clang-cl
140 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-clangcl.cfg.in")
142 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-static-clangcl.cfg.in")
146 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared.cfg.in")
148 set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-static.cfg.in")
190 option(LIBCXX_ABI_UNSTABLE "Use the unstable ABI of libc++. This is equivalent to specifying LIBCXX_ABI_VERSION=n, where n is the not-yet-stable version." OFF)
201 For example, -DLIBCXX_LIBRARY_VERSION=x.y will result in the library being named
208 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
209 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
226 option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
228 # C Library options -----------------------------------------------------------
230 set(LIBCXX_SUPPORTED_C_LIBRARIES system llvm-libc)
236 # ABI Library options ---------------------------------------------------------
243 set(LIBCXX_SUPPORTED_ABI_LIBRARIES none libcxxabi system-libcxxabi libcxxrt libstdc++ libsupc++ vcruntime)
284 # Build libc++abi with libunwind. We need this option to determine whether to
285 # link with libunwind or libgcc_s while running the test cases.
288 # Target options --------------------------------------------------------------
294 # Feature options -------------------------------------------------------------
296 option(LIBCXX_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF)
297 option(LIBCXX_HAS_WIN32_THREAD_API "Ignore auto-detection and force use of win32 thread API" OFF)
308 # Misc options ----------------------------------------------------------------
309 # FIXME: Turn -pedantic back ON. It is currently off because it warns
372 " https://github.com/llvm/llvm-project/issues/66117"
405 # instead of hard-coding include/c++/v1.
408 "Path where target-agnostic libc++ headers should be installed.")
412 "Path where target-agnostic libc++ module source files should be installed.")
429 "Path where target-specific libc++ headers should be installed.")
445 "Path where target-specific libc++ headers should be installed.")
462 "Additional compile flags to use when building libc++. This should be a CMake ;-delimited list of individual
463 compiler options to use. For options that must be passed as-is to the compiler without deduplication (e.g.
464 `-Xclang -foo` option groups), consider using `SHELL:` (https://cmake.org/cmake/help/latest/command/add_compile_options.html#option-de-duplication).")
473 # 'config-ix' use them during feature checks. It also adds them to both
477 add_flags_if_supported("-mdefault-visibility-export-mapping=explicit")
482 include(config-ix)
492 # Remove the -pedantic flag and -Wno-pedantic and -pedantic-errors
493 # so they don't get transformed into -Wno and -errors respectively.
494 remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
506 # functions based on the deployment target -- they are always available
509 target_add_compile_flags_if_supported(${target} PRIVATE -fno-aligned-allocation)
511 target_add_compile_flags_if_supported(${target} PRIVATE -faligned-allocation)
515 # MSVC only has -X, which disables all default includes; including the crt.
518 target_add_compile_flags_if_supported(${target} PUBLIC -nostdinc++)
523 target_add_compile_flags_if_supported(${target} PRIVATE -fvisibility-inlines-hidden)
525 # Our visibility annotations are not quite right for non-Clang compilers,
530 target_add_compile_flags_if_supported(${target} PRIVATE -fvisibility=hidden)
533 # Build with -fsized-deallocation, which is default in recent versions of Clang.
535 target_add_compile_flags_if_supported(${target} PRIVATE -fsized-deallocation)
539 target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY)
544 target_compile_definitions(${target} PRIVATE -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES)
548 target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_PTHREAD_LIB)
551 target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_RT_LIB)
562 target_add_compile_flags_if_supported(${target} PUBLIC -EHsc)
564 target_add_compile_flags_if_supported(${target} PUBLIC -EHs- -EHa-)
565 target_add_compile_flags_if_supported(${target} PUBLIC -fno-exceptions)
573 target_add_compile_flags_if_supported(${target} PUBLIC -GR-)
575 target_add_compile_flags_if_supported(${target} PUBLIC -fno-rtti)
581 # FIXME The libc++ sources are fundamentally non-modular. They need special
587 target_add_compile_flags_if_supported(${target} PUBLIC -Wno-unused-command-line-argument)
588 target_compile_options(${target} PUBLIC -fno-modules)
602 append_flags_if_supported(SANITIZER_FLAGS "-fno-omit-frame-pointer")
603 append_flags_if_supported(SANITIZER_FLAGS "-gline-tables-only")
607 append_flags_if_supported(SANITIZER_FLAGS "-gline-tables-only")
610 append_flags(SANITIZER_FLAGS "-fsanitize=address")
612 append_flags(SANITIZER_FLAGS "-fsanitize=hwaddress")
614 append_flags(SANITIZER_FLAGS -fsanitize=memory)
616 append_flags(SANITIZER_FLAGS "-fsanitize-memory-track-origins")
619 append_flags(SANITIZER_FLAGS "-fsanitize=undefined" "-fno-sanitize=vptr,function" "-fno-sanitize-recover=all")
622 append_flags(SANITIZER_FLAGS "-fsanitize=address,undefined" "-fno-sanitize=vptr,function" "-fno-sanitize-recover=all")
624 append_flags(SANITIZER_FLAGS -fsanitize=thread)
626 append_flags(SANITIZER_FLAGS -fsanitize=dataflow)
637 add_library(cxx-sanitizer-flags INTERFACE)
638 target_compile_options(cxx-sanitizer-flags INTERFACE ${SANITIZER_FLAGS})
647 # For context, read: https://github.com/llvm/llvm-project/pull/72677#pullrequestreview-1765402800
649 if (NOT "${building_with_asan}" STREQUAL "-1")
658 target_link_libraries(${target} PRIVATE "-nostdlib++")
662 # If we're linking directly against the libunwind that we're building
664 # default libunwind (which may be missing still).
665 target_add_link_flags_if_supported(${target} PRIVATE "--unwindlib=none")
707 # Required for standards-complaint wide character formatting functions
718 # Windows-related flags =======================================================
722 # Ignore the -MSC_VER mismatch, as we may build
819 message(STATUS "Generating custom __config for non-DLL Windows build")
826 add_definitions(-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
838 target_link_libraries(${target} PRIVATE cxx-sanitizer-flags)
844 add_custom_target(cxx-test-depends
858 add_subdirectory(docs)