[SYCL][Driver] Forward SYCL tool options as individual tokens#22693
Open
sarnex wants to merge 4 commits into
Open
[SYCL][Driver] Forward SYCL tool options as individual tokens#22693sarnex wants to merge 4 commits into
sarnex wants to merge 4 commits into
Conversation
Signed-off-by: Nick Sarnie <nick.sarnie@intel.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR updates SYCL-related option forwarding so that tool options are passed as individual tokens (via repeated --*-options= occurrences) rather than as a single space-delimited string that is re-split later in clang-linker-wrapper.
Changes:
- Forward
-Xdevice-post-link,-Xspirv-translator, and-Xspirv-to-ir-wrapperoptions as individual tokens (no whitespace re-splitting in the linker-wrapper). - Update
LinkerWrapper::ConstructJobto emit repeated--sycl-post-link-options=/--llvm-spirv-options=/--spirv-to-ir-wrapper-options=arguments per token. - Adjust and extend driver tests to validate multi-token forwarding behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp | Stops splitting forwarded option strings on spaces; expects tokens to arrive already separated. |
| clang/lib/Driver/ToolChains/Clang.cpp | Emits one wrapper option occurrence per token instead of a single joined string. |
| clang/test/Driver/sycl-spirv-to-ir-opt.cpp | Adds coverage for multi-token -Xspirv-to-ir-wrapper forwarding. |
| clang/test/Driver/sycl-spirv-opt.cpp | Adds coverage for multi-token -Xspirv-translator forwarding. |
| clang/test/Driver/sycl-device-post-link-opt.cpp | Adds coverage for multi-token -Xdevice-post-link forwarding. |
| clang/test/Driver/sycl-offload-new-driver.cpp | Updates checks to reflect per-token --sycl-post-link-options= emission. |
| clang/test/Driver/sycl-linker-wrapper-image.cpp | Updates direct wrapper invocation to pass repeated -sycl-post-link-options tokens. |
| clang/test/Driver/sycl-spirv-metadata.cpp | Updates check to match new per-token --llvm-spirv-options= behavior. |
bader
reviewed
Jul 20, 2026
bader
left a comment
Contributor
There was a problem hiding this comment.
LGTM with one suggestion for test improvement (which applies to my PR as well :)).
Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
bader
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend #22645 to apply for
-Xdevice-post-link,-Xspirv-translatorand-Xspirv-to-ir.CMPLRLLVM-77053