Skip to content

Commit 75f72fc

Browse files
author
kr-2003
committed
using LLVM_BUILT_WITH_OOP_JIT
1 parent 6561098 commit 75f72fc

File tree

6 files changed

+7
-17
lines changed

6 files changed

+7
-17
lines changed

.github/actions/Build_and_Test_CppInterOp/action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ runs:
2323
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
2424
2525
# Build CppInterOp next to cling and llvm-project.
26-
if [[ "${{ matrix.oop-jit }}" == "On" ]]; then
27-
if [[ -f VERSION ]]; then
28-
sed -i.bak 's/1\.8\.0;dev/1.8.1;dev/' VERSION
29-
rm -f VERSION.bak
30-
fi
31-
fi
3226
mkdir build && cd build
3327
export CPPINTEROP_BUILD_DIR=$PWD
3428
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
@@ -54,6 +48,7 @@ runs:
5448
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} \
5549
-DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR \
5650
-DLLVM_ENABLE_WERROR=On \
51+
-DLLVM_BUILT_WITH_OOP_JIT=${{ matrix.oop-jit }} \
5752
../
5853
fi
5954
docs_on=$(echo "${{ matrix.documentation }}" | tr '[:lower:]' '[:upper:]')

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,11 @@ string(REPLACE "-Wcovered-switch-default" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
395395

396396
file(STRINGS "VERSION" CPPINTEROP_VERSION)
397397
string(REPLACE "." ";" VERSION_LIST "${CPPINTEROP_VERSION}")
398-
string(REPLACE "\;" ";" VERSION_LIST "${VERSION_LIST}")
399398

400399
list(GET VERSION_LIST 0 CPPINTEROP_VERSION_MAJOR)
401400
list(GET VERSION_LIST 1 CPPINTEROP_VERSION_MINOR)
402401
list(GET VERSION_LIST 2 CPPINTEROP_VERSION_PATCH)
403402

404-
if(NOT CPPINTEROP_VERSION_PATCH STREQUAL "0")
405-
add_definitions(-DCPPINTEROP_VERSION_PATCH)
406-
endif()
407-
408403
configure_file(
409404
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOp/CppInterOpConfig.cmake.in
410405
${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOp/CppInterOpConfig.cmake

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ cmake --build . --target install --parallel $(nproc --all)
355355

356356
and
357357

358-
> Do make sure to apply the patch and change VERSION file to ``1.8.1;dev``, if you want to have out-of-process JIT execution feature enabled.
358+
> Do make sure to pass ``DLLVM_BUILT_WITH_OOP_JIT=ON``, if you want to have out-of-process JIT execution feature enabled.
359359

360360
```powershell
361361
cmake -DLLVM_DIR=$env:LLVM_DIR\build\lib\cmake\llvm -DClang_DIR=$env:LLVM_DIR\build\lib\cmake\clang -DCMAKE_INSTALL_PREFIX=$env:CPPINTEROP_DIR ..

docs/InstallationAndUsage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ commands on Linux and MacOS
321321
322322
.. note::
323323

324-
Do make sure to apply the patch and change VERSION file to ``1.8.1;dev``, if you want to have out-of-process JIT execution feature enabled.
324+
Do make sure to pass ``DLLVM_BUILT_WITH_OOP_JIT=ON``, if you want to have out-of-process JIT execution feature enabled.
325325

326326
and
327327

lib/CppInterOp/Compatibility.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ inline void codeComplete(std::vector<std::string>& Results,
205205

206206
#include "llvm/Support/Error.h"
207207

208-
#ifdef CPPINTEROP_VERSION_PATCH
208+
#ifdef LLVM_BUILT_WITH_OOP_JIT
209209
#include "clang/Basic/Version.h"
210210
#include "clang/Interpreter/RemoteJITUtils.h"
211211
#include "llvm/TargetParser/Host.h"
@@ -269,7 +269,7 @@ createClangInterpreter(std::vector<const char*>& args, int stdin_fd = 0,
269269
if (CudaEnabled)
270270
DeviceCI->LoadRequestedPlugins();
271271

272-
#ifdef CPPINTEROP_VERSION_PATCH
272+
#ifdef LLVM_BUILT_WITH_OOP_JIT
273273
std::unique_ptr<llvm::orc::LLJITBuilder> JB;
274274

275275
if (outOfProcess) {
@@ -439,7 +439,7 @@ inline void codeComplete(std::vector<std::string>& Results,
439439
#endif
440440
}
441441

442-
#if defined(CPPINTEROP_VERSION_PATCH) && !defined(_WIN32)
442+
#if defined(LLVM_BUILT_WITH_OOP_JIT) && !defined(_WIN32)
443443
inline pid_t getExecutorPID() { return /*llvm*/ getLastLaunchedExecutorPID(); }
444444

445445
inline pid_t getNthExecutorPID() { return /*llvm*/ getNthLaunchedExecutorPID(); }

lib/CppInterOp/CppInterOp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3991,7 +3991,7 @@ int Undo(unsigned N) {
39913991

39923992
#ifndef _WIN32
39933993
pid_t GetExecutorPID() {
3994-
#ifdef CPPINTEROP_VERSION_PATCH
3994+
#ifdef LLVM_BUILT_WITH_OOP_JIT
39953995
return compat::getExecutorPID();
39963996
#endif
39973997
return -1;

0 commit comments

Comments
 (0)