Skip to content

[Clang][SYCL] Introduce warn_drv_unsupported_option_for_target_host_only - #22411

Merged
wenju-he merged 1 commit into
intel:sycl-webfrom
wenju-he:fix-hip-sanitize-options.hip
Jun 24, 2026
Merged

[Clang][SYCL] Introduce warn_drv_unsupported_option_for_target_host_only#22411
wenju-he merged 1 commit into
intel:sycl-webfrom
wenju-he:fix-hip-sanitize-options.hip

Conversation

@wenju-he

Copy link
Copy Markdown
Contributor

The diagnostic warn_drv_unsupported_option_for_target was extended with a %select to append "; only supported for host compilation" for SYCL's use case (commit 707093d), requiring a third argument at all call sites.

707093d's change now breaks test Driver/hip-sanitize-options.hip which only expects 2 args.

Fix by splitting the diagnostic into two:

  • warn_drv_unsupported_option_for_target (2 args, same-as-upstream)
  • warn_drv_unsupported_option_for_target_host_only (2 args, SYCL-specific)

Update SYCL.cpp to use the new variant; drop the stale << 0 third arg from SanitizerArgs.cpp and Clang.cpp. Now Clang.cpp part is the same as upstream.

CMPLRLLVM-76199

The diagnostic warn_drv_unsupported_option_for_target was extended with
a %select to append "; only supported for host compilation" for SYCL's
use case (commit 707093d), requiring a third argument at all call
sites.

707093d's change now breaks test Driver/hip-sanitize-options.hip
which only expects 2 args.

Fix by splitting the diagnostic into two:
- warn_drv_unsupported_option_for_target (2 args, same-as-upstream)
- warn_drv_unsupported_option_for_target_host_only (2 args, SYCL-specific)

Update SYCL.cpp to use the new variant; drop the stale << 0 third arg
from SanitizerArgs.cpp and Clang.cpp. Now Clang.cpp part is the same as upstream.

CMPLRLLVM-76199

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wenju-he
wenju-he requested review from a team as code owners June 24, 2026 10:46
@wenju-he
wenju-he merged commit 3c94e36 into intel:sycl-web Jun 24, 2026
@wenju-he
wenju-he deleted the fix-hip-sanitize-options.hip branch June 24, 2026 23:57
wenju-he added a commit that referenced this pull request Jun 26, 2026
…nly (#22411)

The diagnostic warn_drv_unsupported_option_for_target was extended with
a %select to append "; only supported for host compilation" for SYCL's
use case (commit 707093d), requiring a third argument at all call sites.

707093d's change now breaks test Driver/hip-sanitize-options.hip
which only expects 2 args.

Fix by splitting the diagnostic into two:
- warn_drv_unsupported_option_for_target (2 args, same-as-upstream)
- warn_drv_unsupported_option_for_target_host_only (2 args, SYCL-specific)

Update SYCL.cpp to use the new variant; drop the stale << 0 third arg
from SanitizerArgs.cpp and Clang.cpp. Now Clang.cpp part is the same as upstream.

CMPLRLLVM-76199

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
wenju-he added a commit that referenced this pull request Jun 28, 2026
…nly (#22411)

The diagnostic warn_drv_unsupported_option_for_target was extended with
a %select to append "; only supported for host compilation" for SYCL's
use case (commit 707093d), requiring a third argument at all call sites.

707093d's change now breaks test Driver/hip-sanitize-options.hip
which only expects 2 args.

Fix by splitting the diagnostic into two:
- warn_drv_unsupported_option_for_target (2 args, same-as-upstream)
- warn_drv_unsupported_option_for_target_host_only (2 args, SYCL-specific)

Update SYCL.cpp to use the new variant; drop the stale << 0 third arg
from SanitizerArgs.cpp and Clang.cpp. Now Clang.cpp part is the same as upstream.

CMPLRLLVM-76199

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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