summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2019-04-05 21:01:50 +0000
committerAlex Langford <apl@fb.com>2019-04-05 21:01:50 +0000
commit7e7f79ccb19dd66e5447de60e4ae02d94dfe5130 (patch)
treef6bf6d464a4b3a7b09e77118877612874f1748b4
parentc538c501134c98f22513d5254c0b912e71107ef9 (diff)
downloadbcm5719-llvm-7e7f79ccb19dd66e5447de60e4ae02d94dfe5130.tar.gz
bcm5719-llvm-7e7f79ccb19dd66e5447de60e4ae02d94dfe5130.zip
[CMake] Don't explicitly use LLVM_LIBRARY_DIR in standalone builds
Summary: This line is unnecessary because add_llvm_executable will handle linking the correct LLVM libraries for you. LLDB standalone builds are totally fine without this. In the best case, having this line here is harmless. In the worst case it can cause link issues. If you build lldb-server for android using the standalone build, this line will cause LLVM_LIBRARY_DIR to be the first place you look for libraries. This is an issue because if you built libc++, it will try to link against that one instead of the one from the android NDK. Meanwhile, the LLVM libraries you're linking against were linked against the libc++ from the NDK. Ideally, we would take advantage of the AFTER option for link_directories(), but that was not available in LLDB's minimum supported version of CMake (CMake 3.4.3). Differential Revision: https://reviews.llvm.org/D60180 llvm-svn: 357817
-rw-r--r--lldb/cmake/modules/LLDBStandalone.cmake3
1 files changed, 0 insertions, 3 deletions
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake
index b368f36cef8..6accd66c43b 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/lldb/cmake/modules/LLDBStandalone.cmake
@@ -21,7 +21,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
- set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
set(lit_file_name "llvm-lit")
@@ -95,8 +94,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
"${LLVM_INCLUDE_DIRS}"
"${CLANG_INCLUDE_DIRS}")
- link_directories("${LLVM_LIBRARY_DIR}")
-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
OpenPOWER on IntegriCloud