Skip to content

[Driver][SYCL] Add additional debug settings when using -g on Windows #6909

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

Merged
merged 2 commits into from
Oct 2, 2022

Conversation

mdtoguchi
Copy link
Contributor

A recent addition of adding sycld.lib on Windows when using the Linux based driver was performed. There is additional tie-ins needed for general usage of debug libraries, which includes adding -D_DEBUG. Add the needed macro and also pull in the debug runtime library to match. This is done only for -fsycl based compilations as that is when we are pulling in these particular libraries.

A recent addition of adding sycld.lib on Windows when using the Linux based
driver was performed.  There is additional tie-ins needed for general usage
of debug libraries, which includes adding -D_DEBUG.
Add the needed macro and also pull in the debug runtime library to match.
This is done only for -fsycl based compilations as that is when we are
pulling in these particular libraries.
@mdtoguchi mdtoguchi requested a review from a team as a code owner September 29, 2022 01:34
@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers, this should be ready to go.

@bader bader merged commit 70b6767 into intel:sycl Oct 2, 2022
@ph0b
Copy link
Contributor

ph0b commented Oct 4, 2022

If I understand correctly, this changes makes pulling all the debug libraries when using -g.
-g is used to generate debug information and that shouldn't lead to the use of debug version of libraries in my view.
Use of debug libraries goes way beyond the scope of debug info, have you considered using other ways?

@mdtoguchi
Copy link
Contributor Author

If I understand correctly, this changes makes pulling all the debug libraries when using -g. -g is used to generate debug information and that shouldn't lead to the use of debug version of libraries in my view. Use of debug libraries goes way beyond the scope of debug info, have you considered using other ways?

@ph0b, yes. There is a newly introduced -fms-runtime-lib=<arg> that we can use instead. This has direct correlation to the /MD* and /MT* options from the MSVC side. We can use that to leverage which debug libraries will be pulled in using the Linux based driver on Windows.

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