Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add LTCG linker flag for optimization #310

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 3 commits into from
Apr 1, 2025

Conversation

nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Apr 1, 2025

No description provided.

@nrspruit nrspruit force-pushed the add_ltcg_linker_flag branch from 8eaef76 to 42127a7 Compare April 1, 2025 18:01
Copy link

@leonardo-intel leonardo-intel left a comment

Choose a reason for hiding this comment

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

This morning we had a meeting regarding this flag and it was discussed that setting /LTCG:incremental disables whole program optimization. Also, the binskim output recommends to use /LTCG along with WholeProgramOptimization (/GL).

C:\Users\callumso\dev\npu-driver\build\x64\level_zero\src\level_zero-build\bin\Release\ze_loader.dll: warning BA6006: 'ze_loader.dll' was compiled without Link Time Code Generation (/LTCG). Enabling LTCG can improve optimizations and performance.
For VC projects use WholeProgramOptimization property with 'true' value.

so can you update the PR to not set LTCG with incremental linking, and to also enable WholeProgramOptimization
So the linker flags should be:
/LTCG
/GL

Signed-off-by: Neil R. Spruit <[email protected]>
@nrspruit nrspruit marked this pull request as ready for review April 1, 2025 19:55
Signed-off-by: Neil R. Spruit <[email protected]>
@nrspruit nrspruit merged commit 9851ce3 into oneapi-src:master Apr 1, 2025
50 checks passed
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