Skip to content

Commit 48e200a

Browse files
committed
Path to LLVM dev tools
1 parent 00be79a commit 48e200a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

flang-rt/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ include(FlangCommon)
6565
############################
6666

6767
# Setting these variables from an LLVM build is sufficient that flang-rt can
68-
# construct the output paths, so it can behave as if it were in-tree here.
68+
# construct the output paths, so it can behave as if it was in-tree here.
6969
set(LLVM_TREE_AVAILABLE OFF)
7070
if (LLVM_LIBRARY_OUTPUT_INTDIR AND LLVM_RUNTIME_OUTPUT_INTDIR AND PACKAGE_VERSION)
7171
# This is a bootstap build
7272
set(LLVM_TREE_AVAILABLE ON)
7373
endif()
7474

75+
# Path to LLVM development tools (FileCheck, llvm-lit, not, ...)
76+
set(LLVM_TOOLS_DIR "${LLVM_BINARY_DIR}/bin")
77+
7578
if (LLVM_TREE_AVAILABLE)
7679
# In a bootstrap build emit the libraries into a default search path in the
7780
# build directory of the just-built compiler. This allows using the

flang-rt/test/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ llvm_canonicalize_cmake_booleans(
1616
LLVM_ENABLE_PLUGINS
1717
)
1818

19-
set(FLANG_TOOLS_DIR ${FLANG_BINARY_DIR}/bin)
20-
2119
configure_lit_site_cfg(
2220
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
2321
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py

flang-rt/unittests/Runtime/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ add_flangrt_unittest(RuntimeTests
3737
Time.cpp
3838
TemporaryStack.cpp
3939
Transformational.cpp
40+
4041
LINK_LIBS
4142
flang_rt.unittest
4243
)
44+
message("${LLVM_TOOLS_DIR}/not${CMAKE_EXECUTABLE_SUFFIX}")
45+
target_compile_definitions(RuntimeTests PRIVATE NOT_EXE="${LLVM_TOOLS_DIR}/not${CMAKE_EXECUTABLE_SUFFIX}")
4346

4447
if (FLANG_RT_ENABLE_CUF)
45-
target_compile_definitions(FlangRuntimeTests PRIVATE NOT_EXE="$<TARGET_FILE:not>")
46-
4748
add_subdirectory(CUDA)
4849
endif ()

0 commit comments

Comments
 (0)