Skip to content

[interop] Resolve libclangCppInterOp relative to libcppjit at runtime - #24

Merged
aaronj0 merged 1 commit into
mainfrom
cppinterop-relative-lookup
Aug 18, 2026
Merged

[interop] Resolve libclangCppInterOp relative to libcppjit at runtime#24
aaronj0 merged 1 commit into
mainfrom
cppinterop-relative-lookup

Conversation

@aaronj0

@aaronj0 aaronj0 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The backend used to locate libclangCppInterOp through absolute build-time paths, so a wheel built on one machine could not load on another.

This PR implements the following:

  • Library and headers are resolved relative to libcppjit's own load location, with the build-time install prefix as the fallback for build trees. This is necessary for the wheels building infrastructure (Support building wheels for manylinux and OSX #22).

Validation:

  • full test suite passes locally across different cxx standard builds
  • wheel relocatability: a wheel built in an isolated environment installs and runs in a second fresh venv after the build environment is deleted
  • the install-prefix fallback verified against a bare build-directory libcppjit.so
  • Ran clang-format-18

@aaronj0 aaronj0 self-assigned this Aug 18, 2026
@aaronj0 aaronj0 added enhancement New feature or request build-system labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Test Results

Configuration Result
macos-26-intel-llvm21-py3.14-cxx20 = 437 passed, 44 skipped, 85 xfailed, 32 xpassed, 100 warnings in 111.23s (0:01:51) =
macos-26-llvm21-py3.14-cxx20 = 438 passed, 37 skipped, 93 xfailed, 30 xpassed, 100 warnings in 62.02s (0:01:02) =
ubuntu-24.04-llvm21-py3.14-cxx20-vg =========== 553 passed, 25 skipped, 18 xfailed, 2 xpassed in 59.35s ============
ubuntu-24.04-llvm22-py3.14-cxx20 ====== 553 passed, 25 skipped, 19 xfailed, 1 xpassed in 108.50s (0:01:48) ======
ubuntu-24.04-llvm22-py3.14-cxx20-cling ====== 543 passed, 25 skipped, 27 xfailed, 3 xpassed in 103.52s (0:01:43) ======
ubuntu-24.04-llvm22-py3.14-cxx23 ====== 574 passed, 3 skipped, 20 xfailed, 1 xpassed in 117.26s (0:01:57) =======

Comment thread src/interop/interop_wrapper.cxx

@Vipul-Cariappa Vipul-Cariappa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Modulo Vassil's comment.

Comment thread src/interop/interop_wrapper.cxx
@aaronj0
aaronj0 merged commit 0fc56f0 into main Aug 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-system enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants