Skip to content

Conversation

@mdtoguchi
Copy link
Contributor

When -fsycl-targets= -fsycl-targets=arg is passed on the command line, the empty -fsycl-targets= is processed and crashes due to the empty argument. Update the specific option parsing to use 'getLastArg' to avoid this situation. When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.

When -fsycl-targets= -fsycl-targets=arg is passed on the command line,
the empty -fsycl-targets= is processed and crashes due to the empty
argument.  Update the specific option parsing to use 'getLastArg' to
avoid this situation.  When the last arg has an empty argument, the
driver will diagnose this situation and emit a friendly diagnostic.
@mdtoguchi mdtoguchi requested a review from a team as a code owner October 18, 2024 18:28
@srividya-sundaram
Copy link
Contributor

When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.

I'm not able to see the corresponding code changes for this in the PR.

@mdtoguchi
Copy link
Contributor Author

mdtoguchi commented Oct 18, 2024

When the last arg has an empty argument, the driver will diagnose this situation and emit a friendly diagnostic.

I'm not able to see the corresponding code changes for this in the PR.

There are no explicit changes that reflect this - it is existing behavior:
> clang++ -fsycl -fsycl-targets= ~/a.cpp
clang++: warning: joined argument expects additional value: '-fsycl-targets=' [-Wunused-command-line-argument]

@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers, this change looks ready to merge, please take a look. Thanks!

@sommerlukas sommerlukas merged commit 3c291ef into intel:sycl Oct 21, 2024
12 checks passed
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.

3 participants