Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[compiler-rt] Use the runtimes build for custom libc++"
This reverts commit bda3f2d since it broke MSan tests.
- Loading branch information
Showing
2 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# TODO(phosek): We should use the runtimes build instead configured with | ||
# LLVM_ENABLE_RUNTIMES=libcxxabi;libcxx to avoid duplication of logic. | ||
|
||
cmake_minimum_required(VERSION 3.13.4) | ||
project(custom-libcxx C CXX) | ||
|
||
find_package(Python3 REQUIRED COMPONENTS Interpreter) | ||
|
||
# Build static libcxxabi. | ||
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_EXCEPTIONS ON CACHE BOOL "") | ||
set(LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE STRING "") | ||
set(LIBCXXABI_LIBCXX_PATH ${COMPILER_RT_LIBCXX_PATH} CACHE PATH "") | ||
set(LIBCXXABI_INCLUDE_TESTS OFF CACHE BOOL "") | ||
add_subdirectory(${COMPILER_RT_LIBCXXABI_PATH} ${CMAKE_CURRENT_BINARY_DIR}/cxxabi) | ||
|
||
# Build static libcxx without exceptions. | ||
set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") | ||
set(LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") | ||
|
||
# Use above libcxxabi. | ||
set(LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "") | ||
set(LIBCXX_CXX_ABI_INTREE 1) | ||
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") | ||
set(LIBCXX_CXX_ABI_INCLUDE_PATHS ${COMPILER_RT_LIBCXXABI_PATH}/include CACHE PATH "") | ||
|
||
add_subdirectory(${COMPILER_RT_LIBCXX_PATH} ${CMAKE_CURRENT_BINARY_DIR}/cxx) |