Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitek Karas <10670590+vitek-karas@users.noreply.github.com>2022-01-06 22:37:08 +0300
committerGitHub <noreply@github.com>2022-01-06 22:37:08 +0300
commite28b7f3f306bb410a8a1a2f4b80f413fdea4ce86 (patch)
tree14e640b461815a51dd23177e2cd2b144aff607e0
parent4e27b8551ff51bf0d46cc1ab7181ee2d37a91025 (diff)
Add a custom flag to disable marking of copy assemblies (#2370) (#2437)
Enabled by `--custom-data DisableMarkingOfCopyAssemblies=true` on the command line. Assumes that ALL assemblies on the input are in "copy" action (it doesn't validate this fact). It disables marking basically fully - linker will go over all assemblies, and process them in "copy" mode (copy the original file over) and will call all the custom steps and so on, but it will do no marking (or very little, depends on descriptors and such which this doesn't disable). This is intentionally non-discoverable feature, to be used only by the mono AOT toolchain.
-rw-r--r--src/linker/Linker.Steps/MarkStep.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/linker/Linker.Steps/MarkStep.cs b/src/linker/Linker.Steps/MarkStep.cs
index 6c4ddd172..1d1b95555 100644
--- a/src/linker/Linker.Steps/MarkStep.cs
+++ b/src/linker/Linker.Steps/MarkStep.cs
@@ -1387,7 +1387,9 @@ namespace Mono.Linker.Steps
MarkExportedTypesTarget.ProcessAssembly (assembly, Context);
if (ProcessReferencesStep.IsFullyPreservedAction (Context.Annotations.GetAction (assembly))) {
- MarkEntireAssembly (assembly);
+ if (!Context.TryGetCustomData ("DisableMarkingOfCopyAssemblies", out string? disableMarkingOfCopyAssembliesValue) ||
+ disableMarkingOfCopyAssembliesValue != "true")
+ MarkEntireAssembly (assembly);
return;
}