Skip to content

Commit 4aeee87

Browse files
authored
Update CMakeLists.txt
1 parent 18c420e commit 4aeee87

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

clang/unittests/Interpreter/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,25 @@ set(CLANG_LIBS_TO_LINK
2929
)
3030
endif()
3131

32-
add_distinct_clang_unittest(ClangReplInterpreterTests
32+
set(CLANG_REPL_TEST_SOURCES
3333
IncrementalCompilerBuilderTest.cpp
3434
IncrementalProcessingTest.cpp
3535
InterpreterTest.cpp
3636
InterpreterExtensionsTest.cpp
3737
CodeCompletionTest.cpp
38+
)
39+
40+
if(TARGET compiler-rt)
41+
list(APPEND CLANG_REPL_TEST_SOURCES
42+
OutOfProcessInterpreterTests.cpp
43+
)
44+
message(STATUS "Compiler-RT found, enabling out of process JIT tests")
45+
endif()
46+
47+
add_distinct_clang_unittest(ClangReplInterpreterTests
48+
${CLANG_REPL_TEST_SOURCES}
3849

50+
PARTIAL_SOURCES_INTENDED
3951
EXPORT_SYMBOLS
4052

4153
CLANG_LIBS
@@ -59,6 +71,12 @@ target_link_options(ClangReplInterpreterTests
5971
set_target_properties(ClangReplInterpreterTests PROPERTIES
6072
SUFFIX ".html"
6173
)
74+
if(TARGET compiler-rt)
75+
add_dependencies(ClangReplInterpreterTests
76+
llvm-jitlink-executor
77+
compiler-rt
78+
)
79+
message(STATUS "Adding dependency on compiler-rt for out of process JIT tests")
6280
endif()
6381

6482
# Exceptions on Windows are not yet supported.

0 commit comments

Comments
 (0)