[CMake] In standalone builds, LLVM_BINARY_DIR should point to LLVM's binary directory

Summary: In standalone builds `LLVM_BINARY_DIR` was equal to `LLDB_BINARY_DIR` so far. This is counterintuitive and invalidated the values of `LLDB_DEFAULT_TEST_DSYMUTIL/FILECHECK/COMPILER` etc.

Reviewers: zturner, labath, clayborg, JDevlieghere, stella.stamenova, serge-sans-paille

Reviewed By: labath

Subscribers: mgorny, friss, lldb-commits, #lldb

Differential Revision: https://reviews.llvm.org/D56443

llvm-svn: 350738
This commit is contained in:
Stefan Granitz 2019-01-09 16:25:37 +00:00
parent 644a3289e7
commit 79f41967dc
4 changed files with 4 additions and 6 deletions

View File

@ -110,7 +110,7 @@ if(LLDB_INCLUDE_TESTS)
# FIXME: Standalone builds should import the cxx target as well.
if(LLDB_BUILT_STANDALONE)
# For now check that the include directory exists.
set(cxx_dir "${LLVM_DIR}/../../../include/c++")
set(cxx_dir "${LLVM_BINARY_DIR}/include/c++")
if(NOT EXISTS ${cxx_dir})
message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
endif()

View File

@ -108,10 +108,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
include_directories("${CMAKE_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
# Next three include directories are needed when llvm-config is located in build directory.
# LLVM and Clang are assumed to be built together
if (EXISTS "${LLVM_OBJ_ROOT}/include")

View File

@ -1,6 +1,6 @@
@LIT_SITE_CFG_IN_HEADER@
config.test_exec_root = "@LLVM_BINARY_DIR@"
config.test_exec_root = "@LLDB_BINARY_DIR@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"

View File

@ -1,6 +1,6 @@
@LIT_SITE_CFG_IN_HEADER@
config.test_exec_root = "@LLVM_BINARY_DIR@"
config.test_exec_root = "@LLDB_BINARY_DIR@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"