-
Notifications
You must be signed in to change notification settings - Fork 5k
[9.0] libnethost no LTCG #113893
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
[9.0] libnethost no LTCG #113893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (2)
- src/native/corehost/hostmisc/CMakeLists.txt: Language not supported
- src/native/corehost/nethost/CMakeLists.txt: Language not supported
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. please get a code review. we will take for consideration in 9.0.x
Friendly reminder that code complete is on April 14th for the May Release. If you'd like to get this change included in that release, please get a Tactics approval and merge this PR before that date. |
Not that it changes anything, but just for the record, it's also important for the use case of non-Microsoft linkers such as Thanks for the fix! |
Fixes Issue #113183
main PR #111805 (slimmed down for servicing)
Description
Ensure that libnethost isn't built with the
/LTCG
flag, so users can use any version of MSVC to build their native .NET host using libnethost.Customer Impact
Users can't use the static libnethost unless they build their native host with the same compiler that we build .NET 9.0 with.
LTCG (link-time code-gen) requires the customer to use the exact same version of MSVC that we used if they want to build. We are reverting the flags to the old list (ensuring we don't specify LTCG for any object files in the libnethost static library). The only policy we have is that we can't put LTCG objects in any static library we ship
Regression
Yes, regressed in #102475
Testing
Locally validated that the libnethost static library doesn't have any files built with LTCG.
Risk
Low risk. Only affects users of libnethost.
Package authoring signed off?
IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.