Skip to content

Commit e7b0864

Browse files
committed
Resolving comments
1 parent 4a2c91e commit e7b0864

File tree

7 files changed

+13
-19
lines changed

7 files changed

+13
-19
lines changed

.github/actions/Build_LLVM/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ runs:
6161
-DLLVM_INCLUDE_EXAMPLES=OFF \
6262
-DLLVM_INCLUDE_TESTS=OFF \
6363
../llvm
64-
ninja clang clangInterpreter clangStaticAnalyzerCore -j ${{ env.ncpus }}
64+
ninja clang clangInterpreter clangStaticAnalyzerCore
6565
if [[ "${{ matrix.oop-jit }}" == "On" ]]; then
6666
if [[ "${{ matrix.os }}" == macos* ]]; then
6767
SUFFIX="_osx"

.github/actions/Build_and_Test_CppInterOp/action.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ runs:
6060
os="${{ matrix.os }}"
6161
if [[ "${os}" != "macos"* ]]; then
6262
CLANG_VERSION="${{ matrix.clang-runtime }}"
63-
if [[ "${{ matrix.cling }}" == "On" ]]; then
64-
CLANG_INTERPRETER="cling"
65-
else
66-
CLANG_INTERPRETER="clang"
67-
fi
68-
SUPPRESSION_FILE="../etc/${CLANG_INTERPRETER}${CLANG_VERSION}-valgrind.supp"
69-
if [[ "$CLANG_VERSION" == "20" ]]; then
63+
if [[ "$CLANG_VERSION" == "20" && "${{ matrix.cling }}" == "Off" ]]; then
64+
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
7065
valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 \
7166
--show-leak-kinds=definite,possible \
7267
--suppressions="${SUPPRESSION_FILE}" \

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,15 @@ include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
298298
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
299299
add_definitions(${LLVM_DEFINITIONS_LIST})
300300

301-
string(REGEX REPLACE "/lib/cmake/llvm$" "" LLVM_BUILD_LIB_DIR "${LLVM_DIR}")
302-
add_definitions(-DLLVM_BUILD_LIB_DIR="${LLVM_BUILD_LIB_DIR}")
301+
string(REGEX REPLACE "/lib/cmake/llvm$" "" LLVM_BINARY_LIB_DIR "${LLVM_DIR}")
302+
add_definitions(-DLLVM_BINARY_LIB_DIR="${LLVM_BINARY_LIB_DIR}")
303303

304304
if(LLVM_BUILT_WITH_OOP_JIT)
305305
if((CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") OR
306306
(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64"))
307307
add_definitions(-DLLVM_BUILT_WITH_OOP_JIT)
308308
else()
309-
message(FATAL_ERROR "LLVM_BUILT_WITH_OOP_JIT is only supported on Darwin arm64 or Linux x86_64. Build aborted.")
309+
message(FATAL_ERROR "LLVM_BUILT_WITH_OOP_JIT is only supported on MacOS arm64 or Linux x86_64. Build aborted.")
310310
endif()
311311
endif()
312312

etc/clang20-valgrind.supp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
fun:_ZZN4llvm3orc23AsynchronousSymbolQuery14handleCompleteERNS0_16ExecutionSessionEEN20RunQueryCompleteTask3runEv
1616
fun:_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN4llvm3orc31DynamicThreadPoolTaskDispatcher8dispatchESt10unique_ptrINS4_4TaskESt14default_deleteIS7_EEEUlvE_EEEEE6_M_runEv
1717
obj:/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30
18-
}
18+
}

lib/CppInterOp/Compatibility.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ createClangInterpreter(std::vector<const char*>& args, int stdin_fd = -1,
261261
DeviceCI->LoadRequestedPlugins();
262262

263263
bool outOfProcess;
264-
#if defined(_WIN32)
264+
#if defined(_WIN32) || !defined(LLVM_BUILT_WITH_OOP_JIT)
265265
outOfProcess = false;
266266
#else
267267
outOfProcess = std::any_of(args.begin(), args.end(), [](const char* arg) {
@@ -275,7 +275,7 @@ createClangInterpreter(std::vector<const char*>& args, int stdin_fd = -1,
275275
if (outOfProcess) {
276276
OutOfProcessConfig.IsOutOfProcess = true;
277277
OutOfProcessConfig.OOPExecutor =
278-
LLVM_BUILD_LIB_DIR "/bin/llvm-jitlink-executor";
278+
LLVM_BINARY_LIB_DIR "/bin/llvm-jitlink-executor";
279279
OutOfProcessConfig.UseSharedMemory = false;
280280
OutOfProcessConfig.SlabAllocateSize = 0;
281281
OutOfProcessConfig.CustomizeFork = [stdin_fd, stdout_fd,
@@ -289,10 +289,10 @@ createClangInterpreter(std::vector<const char*>& args, int stdin_fd = -1,
289289
};
290290

291291
#ifdef __APPLE__
292-
std::string OrcRuntimePath = LLVM_BUILD_LIB_DIR "/lib/clang/" STRINGIFY(
292+
std::string OrcRuntimePath = LLVM_BINARY_LIB_DIR "/lib/clang/" STRINGIFY(
293293
LLVM_VERSION_MAJOR) "/lib/darwin/liborc_rt_osx.a";
294294
#else
295-
std::string OrcRuntimePath = LLVM_BUILD_LIB_DIR "/lib/clang/" STRINGIFY(
295+
std::string OrcRuntimePath = LLVM_BINARY_LIB_DIR "/lib/clang/" STRINGIFY(
296296
LLVM_VERSION_MAJOR) "/lib/x86_64-unknown-linux-gnu/liborc_rt.a";
297297
#endif
298298
OutOfProcessConfig.OrcRuntimePath = OrcRuntimePath;

lib/CppInterOp/CppInterOpInterpreter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class Interpreter {
225225
auto io_ctx = std::make_unique<IOContext>();
226226
bool outOfProcess = false;
227227

228-
#if defined(_WIN32)
228+
#if defined(_WIN32) || !defined(LLVM_BUILT_WITH_OOP_JIT)
229229
outOfProcess = false;
230230
#else
231231
outOfProcess = std::any_of(vargs.begin(), vargs.end(), [](const char* arg) {

unittests/CppInterOp/InterpreterTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ TYPED_TEST(CppInterOpTest, InterpreterTestProcess) {
163163

164164
TYPED_TEST(CppInterOpTest, InterpreterTestEmscriptenExceptionHandling) {
165165
#ifndef EMSCRIPTEN
166-
GTEST_SKIP() << "This test is intended to check exception handling for "
167-
"Emscripten builds.";
166+
GTEST_SKIP() << "This test is intended to check exception handling for Emscripten builds.";
168167
#endif
169168

170169
std::vector<const char*> Args = {

0 commit comments

Comments
 (0)