Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[SYCL][Driver] Link with sycl libs at link step of clang-cl -fsycl (#12793)" #13326

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

againull
Copy link
Contributor

@againull againull commented Apr 9, 2024

This reverts commit d6eecfa.

This was commit was trying to cover the scenario:

clang-cl -I[path to sycl headers] sycl_program.cpp 
clang-cl -fsycl sycl_program.obj

and automatically link with sycl library at link step in such case.

But problem is that at link step there is no way to know if -fsycl -MDd option was used at compile step or not.
if -fsycl -MDd is used at compilation step then driver adds --dependent-lib=msvcrtd --dependent-lib=sycl7d options:
clang-cl -fsycl -MDd sycl_program.cpp # --dependent-lib=msvcrtd --dependent-lib=sycl7d
If then user links the program like this (without -MDd):
clang-cl -fsycl sycl_program.obj then we will also link with sycl7 library (release version) which will cause a problem.
Because at link step we don't know if we need to use debug of release version of the library.

So, from my understanding this case:

clang-cl -I[path to sycl headers] sycl_program.cpp 
clang-cl -fsycl sycl_program.obj

can't be supported and needs to be considered as user's mistake.

@againull againull requested a review from a team as a code owner April 9, 2024 00:58
@againull againull requested a review from mdtoguchi April 9, 2024 01:08
@againull againull closed this Apr 9, 2024
@againull againull deleted the revert_driver_change branch April 9, 2024 19:57
@againull againull restored the revert_driver_change branch April 9, 2024 19:58
@againull againull reopened this Apr 9, 2024
@againull againull merged commit 4b993a7 into intel:sycl Apr 9, 2024
14 checks passed
dm-vodopyanov added a commit that referenced this pull request Apr 24, 2024
Patch which causes the regression:
#12793
Revert of that patch: #13326
@againull againull deleted the revert_driver_change branch July 9, 2024 20:43
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