Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Extend root mode options with library mode - #1811

Merged
marek-safar merged 4 commits into
dotnet:mainfrom
marek-safar:library
Feb 10, 2021
Merged

marek-safar merged 4 commits into
dotnet:mainfrom
marek-safar:library

Conversation

@marek-safar

Copy link
Copy Markdown
Contributor

Fixes #1610

@vitek-karas vitek-karas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Except for the "internal type" thing, looks good.

Comment thread src/linker/Linker.Steps/MarkStep.cs Resolved
Comment on lines +72 to +73
// Assembly root mode wins over any enabled optimization which
// could conflict with library rooting behaviour

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Future refactoring idea: If assembly action is not Link we also effectively disable lot of optimizations, but it's done in each usage site explicitly (check for action and then check for the optimization). Maybe it would be cleaner to disable optimization based on actions as well (not just root mode).

@sbomer sbomer Feb 8, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed - we are increasingly blurring the line between actions and root modes and it seems worthwhile to consider unifying them or separating out the overlapping behaviors (not saying it should be done in this change)

Comment thread docs/illink-options.md Resolved
@marek-safar
marek-safar merged commit 17f809c into dotnet:main Feb 10, 2021
@marek-safar
marek-safar deleted the library branch February 10, 2021 12:29
marek-safar added a commit to marek-safar/linker that referenced this pull request Feb 10, 2021
marek-safar added a commit to marek-safar/linker that referenced this pull request Feb 10, 2021
marek-safar added a commit that referenced this pull request Feb 10, 2021
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
* Extend root mode options with library mode

Fixes dotnet/linker#1610

* PR feedback

* lint

Commit migrated from dotnet/linker@17f809c
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better handling of a library trimming

3 participants