mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-02 13:51:55 +00:00
[compiler-rt] add_custom_libcxx should pass LLVM_PATH and a C++ compiler
Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16681 llvm-svn: 259493
This commit is contained in:
parent
b2dc238736
commit
440b8610e6
@ -66,8 +66,10 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
# Windows where we need to use clang-cl instead.
|
||||
if(NOT MSVC)
|
||||
set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
|
||||
set(COMPILER_RT_TEST_CXX_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++)
|
||||
else()
|
||||
set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang.exe)
|
||||
set(COMPILER_RT_TEST_CXX_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++.exe)
|
||||
endif()
|
||||
else()
|
||||
# Take output dir and install path from the user.
|
||||
@ -81,6 +83,7 @@ else()
|
||||
option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
|
||||
# Use a host compiler to compile/link tests.
|
||||
set(COMPILER_RT_TEST_COMPILER ${CMAKE_C_COMPILER} CACHE PATH "Compiler to use for testing")
|
||||
set(COMPILER_RT_TEST_CXX_COMPILER ${CMAKE_CXX_COMPILER} CACHE PATH "C++ Compiler to use for testing")
|
||||
|
||||
if (NOT LLVM_CONFIG_PATH)
|
||||
find_program(LLVM_CONFIG_PATH "llvm-config"
|
||||
|
@ -293,11 +293,12 @@ macro(add_custom_libcxx name prefix)
|
||||
SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH}
|
||||
CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:STRING=${CMAKE_MAKE_PROGRAM}
|
||||
-DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER}
|
||||
-DCMAKE_C_FLAGS=${LIBCXX_CFLAGS}
|
||||
-DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS}
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
-DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
|
||||
LOG_BUILD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_INSTALL 1
|
||||
|
Loading…
Reference in New Issue
Block a user