Skip to content

Conversation

@AlexeySachkov
Copy link
Contributor

This PR re-introduces a couple of commits which seems to be accidentally reverted during some merge conflict resolutions.

It also serves as an alternative version of #16879 with the intent to keep more of the community code and stop doing variables shadowing in our customizations

Commit

> ccd73ee
> [LinkerWrapper] Remove in-house handling of LTO (llvm/llvm-project#113715)

Removed a lot of dead code from `clang-linker-wrapper`. However, it has
been preserved in our fork by:

> d7c2a0f
> Merge from 'main' to 'sycl-web' (69 commits)

Due to the way we have handled a divergence from the upstream it isn't
really clear if something is our code or not, so it wasn't that hard to
make a conflict resolution mistake.

This commit removes all that dead code to make it closer to the
upstream.
We seem to have put all the community code into a separate branch which
made it hard to maintain (i.e. keep in sync with the upstream).

This commit outlines some common parts of downstream and upstream code
to simplify feature maintanence (by making the code closer to the
upstream overall).
Commit

> 4a96081
> [clang-linker-wrapper] Fix a warning

Seems to be accidentally reverted by

> d7c2a0f
> Merge from 'main' to 'sycl-web' (69 commits)

// Link the remaining device files using the device linker.
Expected<StringRef> OutputOrErr =
HasSYCLOffloadKind ? sycl::linkDevice(InputFiles, LinkerArgs)
Copy link
Contributor

Choose a reason for hiding this comment

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

That's is wrong. We need to call both of these functions depending on the HasSYCLOffloadKind and HasNoSYCLOffloadKind. These two variables are independent of each other!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah..sorry. I missed this on my 1-1 with Alexey Sachkov. Yes. There is a possibility that both HasSYCLOffloadKind and HasNonSYCLOffloadKind are true. So, there is a possibility that both these functions need to run

Copy link
Contributor

Choose a reason for hiding this comment

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

And we are also missing linkBitcodeFiles call here. Are we not?

@AlexeySachkov
Copy link
Contributor Author

Closing for now in favor of #16952 and #16879

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.

4 participants