[SYCL] Add -Wno-sycl-undefined-func-in-image to silence spurious undefined-function warnings - #23012
Open
bviyer wants to merge 5 commits into
Open
[SYCL] Add -Wno-sycl-undefined-func-in-image to silence spurious undefined-function warnings#23012bviyer wants to merge 5 commits into
bviyer wants to merge 5 commits into
Conversation
srividya-sundaram
approved these changes
Aug 25, 2026
srividya-sundaram
left a comment
Contributor
There was a problem hiding this comment.
Clang Driver changes LGTM. Thanks!
| @@ -950,6 +945,8 @@ def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Grou | |||
| def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>, | |||
| Visibility<[ClangOption, CC1Option]>; | |||
| def Wno_sycl_strict : Flag<["-"], "Wno-sycl-strict">, Group<W_Group>, Flags<[HelpHidden]>, HelpText<"Disable warnings which enforce strict SYCL language compatibility.">; | |||
| def Wsycl_undefined_func_in_image : Flag<["-"], "Wsycl-undefined-func-in-image">, Group<W_Group>, Flags<[HelpHidden]>, HelpText<"Warn when a device-code function is referenced but has no definition in the linked device image. By default they are enabled.">; | |||
Contributor
There was a problem hiding this comment.
Nit - The warning is enabled by default.
I think you can remove the "By default.." line for Wno_sycl_undefined_func_in_image
| // -Wno-sycl-undefined-func-in-image silences sycl-post-link's "Undefined | ||
| // function ... found in ..." warning. No clang-side diagnostic uses this | ||
| // group; the driver forwards the -Wno-... form to sycl-post-link. | ||
| def SyclUndefinedFuncInImage : DiagGroup<"sycl-undefined-func-in-image">; |
Contributor
There was a problem hiding this comment.
Can you verify if this is required? What happens when this code is not added?
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.
Silences sycl-post-link's "Undefined function found in
" warning. Intended for symbols resolved by the GPU driver / JIT. Adds the SyclUndefinedFuncInImage DiagGroup; the driver forwards suppress-undefined-func-warnings to sycl-post-link.