Skip to content

[SYCL][Driver][Test] Clean up sysroot in new offload driver test when input are objects or archives - #23560

Open
jinge90 wants to merge 1 commit into
intel:syclfrom
jinge90:remove_sysroot_for_obj_archive
Open

jinge90 wants to merge 1 commit into
intel:syclfrom
jinge90:remove_sysroot_for_obj_archive

Conversation

@jinge90

@jinge90 jinge90 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Devicelib are linked during device compilation phase via -mbuiltin-bitcode-post, some tests for new-offload-driver use .obj or .a file as inputs, so no devicelib linking happens for them, we can safely remove the sysroot usage.

input are objects or archives

Signed-off-by: jinge90 <ge.jin@intel.com>
@jinge90
jinge90 requested a review from a team as a code owner October 20, 2026 08:39
@jinge90
jinge90 requested a balanced review from Copilot October 20, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The test-only cleanup preserves assertions and removes sysroot settings only where device compilation is not performed.

No open issues 🎉

What changed in this PR

Removes unnecessary sysroot settings from SYCL new-offload-driver tests whose object or archive inputs do not require compile-time device libraries.

Changes:

  • Removes sysroot arguments from object-only and archive-input test invocations.
  • Preserves existing checks and sysroot settings for source-compilation tests.
File Description
clang/​test/​Driver/​sycl-spirv-obj.cpp Removes sysroot from the object-linking test.
clang/​test/​Driver/​sycl-option-ownership.cpp Removes sysroot from object-only option tests.
clang/​test/​Driver/​sycl-offload.cpp Cleans up object-linking and unused-archive tests.
clang/​test/​Driver/​sycl-offload-new-driver.cpp Removes sysroot from the multi-target object-linking test.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants