[compiler-rt] 2f2b465 - cmake: Fix build with -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 17:00:18 PST 2022
Author: Tom Stellard
Date: 2022-11-09T17:00:08-08:00
New Revision: 2f2b46502fa2de81e4e521635db064176b53c074
URL: https://github.com/llvm/llvm-project/commit/2f2b46502fa2de81e4e521635db064176b53c074
DIFF: https://github.com/llvm/llvm-project/commit/2f2b46502fa2de81e4e521635db064176b53c074.diff
LOG: cmake: Fix build with -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON
This was broken by a11cd0d94ed3cabf0998a0289aead05da94c86eb.
Added:
Modified:
compiler-rt/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index c722d3416a08..f6b1f1a2ee04 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -639,6 +639,12 @@ elseif (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libstdc++")
endif()
# Unittests support.
+# FIXME: When compiler-rt is build using -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON, then
+# The LLVM_THIRD_PARTY_DIR variable is not set.
+if (NOT LLVM_THIRD_PARTY_DIR)
+ set(LLVM_THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../third-party")
+endif()
+
set(COMPILER_RT_GTEST_PATH ${LLVM_THIRD_PARTY_DIR}/unittest/googletest)
set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc)
set(COMPILER_RT_GTEST_CFLAGS
More information about the llvm-commits
mailing list