Skip to content

Conversation

@mdtoguchi
Copy link
Contributor

When passing options to the clang-offload-wrapper, the -fpreview-breaking-changes option needs to be passed accordingly to the tool when -fpreview-breaking-changes is used on the command line. This was happening for typical SYCL enabled compilations, but when using -fsycl-link, the usage of clang-offload-wrapper modifies the offloading kind encountered, causing the option to not be passed.

Fixup the ability to pass -fpreview-breaking-changes for all needed uses as well as factoring in the offload-compress options which are in the same bucket of behaviors.

When passing options to the clang-offload-wrapper, the
-fpreview-breaking-changes option needs to be passed accordingly to the
tool when -fpreview-breaking-changes is used on the command line.  This
was happening for typical SYCL enabled compilations, but when using
-fsycl-link, the usage of clang-offload-wrapper modifies the offloading
kind encountered, causing the option to not be passed.

Fixup the ability to pass -fpreview-breaking-changes for all needed uses
as well as factoring in the offload-compress options which are in the
same bucket of behaviors.
@mdtoguchi mdtoguchi requested a review from a team as a code owner November 20, 2025 14:58
@mdtoguchi
Copy link
Contributor Author

@intel/dpcpp-clang-driver-reviewers , please take a look.

Copy link
Contributor

@hchilama hchilama left a comment

Choose a reason for hiding this comment

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

Do we have a test case checking for offload-compress and offload-compression-level= ? if so LGTM

@srividya-sundaram
Copy link
Contributor

but when using -fsycl-link, the usage of clang-offload-wrapper modifies the offloading kind encountered, causing the option to not be passed.

Is there a test case for this?

// and enabling preview breaking changes.
auto addCLIOptions = [&](ArgStringList &Args) -> void {
// -offload-compress
if (C.getInputArgs().getLastArg(options::OPT_offload_compress)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this have to be getLastArg and not just hasArg ?

if (C.getInputArgs().getLastArg(options::OPT_offload_compress)) {
Args.push_back(C.getArgs().MakeArgString(Twine("-offload-compress")));
// -offload-compression-level=<>
if (Arg *A = C.getInputArgs().getLastArg(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as above.

@srividya-sundaram
Copy link
Contributor

When passing options to the clang-offload-wrapper, the -fpreview-breaking-changes option needs to be passed accordingly to the tool when -fpreview-breaking-changes is used on the command line. This was happening for typical SYCL enabled compilations, but when using -fsycl-link, the usage of clang-offload-wrapper modifies the offloading kind encountered, causing the option to not be passed.

Fixup the ability to pass -fpreview-breaking-changes for all needed uses as well as factoring in the offload-compress options which are in the same bucket of behaviors.

Please update the description to also mention the changes related to : Validate and propogate CLI options related to device image compression

@srividya-sundaram
Copy link
Contributor

Precommit testing has this failure:

Failed Tests (1):
  SYCL :: DeviceLib/separate_compile_test.cpp

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