Commit d3bbc0c
authored
[illink] refactor code sharing between ILLink and MSBuild tasks (#9688)
We already have a few trimmer steps that run under both ILLink and the
`<LinkAssembliesNoShrink/>` MSBuild task:
* `AddKeepAlivesStep`
* `FixAbstractMethodsStep`
* `FixLegacyResourceDesignerStep`
We want to move various parts of the build to become new trimmer steps
like above.
Previously, we also had to share these steps with the Xamarin.Android
linker pipeline, but that's no longer the case. We can now cleanup how
these trimmer steps are shared between ILLink and MSBuild.
The benefits are:
* The `<LinkAssembliesNoShrink/>` task no longer has a list of subclassed
trimmer steps.
* Much less `#if ILLINK` calls in shared trimmer steps.
A new `MSBuildLinkContext` class will be used for running trimmer steps in
an MSBuild task context. It handles MSBuild logging, etc.
I also removed various Mono linker source code that is unused.1 parent 627e239 commit d3bbc0c
File tree
24 files changed
+175
-779
lines changed- src
- Microsoft.Android.Sdk.ILLink
- Xamarin.Android.Build.Tasks
- Linker
- External
- Linker.Steps
- Linker
- MonoDroid.Tuner
- Tasks
- Tests/Xamarin.Android.Build.Tests/Tasks
- Utilities
24 files changed
+175
-779
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
82 | 96 | | |
83 | 97 | | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 169 | | |
189 | 170 | | |
190 | 171 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 0 additions & 31 deletions
This file was deleted.
0 commit comments