Revert "[SYCL][Driver] Link with sycl libs at link step of clang-cl -fsycl (#12793)" #13326
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.
This reverts commit d6eecfa.
This was commit was trying to cover the scenario:
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:
can't be supported and needs to be considered as user's mistake.