-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow stripping resources with ignore-descriptors (#1146)
- Loading branch information
Showing
35 changed files
with
265 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/Mono.Linker.Tests.Cases.Expectations/Metadata/IgnoreDescriptorsAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Mono.Linker.Tests.Cases.Expectations.Metadata | ||
{ | ||
public sealed class IgnoreDescriptorsAttribute : BaseMetadataAttribute | ||
{ | ||
public readonly bool Value; | ||
|
||
public IgnoreDescriptorsAttribute (bool value) | ||
{ | ||
Value = value; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test/Mono.Linker.Tests.Cases.Expectations/Metadata/IgnoreSubstitutionsAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Mono.Linker.Tests.Cases.Expectations.Metadata | ||
{ | ||
public sealed class IgnoreSubstitutionsAttribute : BaseMetadataAttribute | ||
{ | ||
public readonly bool Value; | ||
|
||
public IgnoreSubstitutionsAttribute (bool value) | ||
{ | ||
Value = value; | ||
} | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
test/Mono.Linker.Tests.Cases.Expectations/Metadata/IncludeBlacklistStepAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/Mono.Linker.Tests.Cases.Expectations/Metadata/StripSubstitutionsAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
|
||
namespace Mono.Linker.Tests.Cases.Expectations.Metadata | ||
{ | ||
public sealed class StripSubstitutionsAttribute : BaseMetadataAttribute | ||
{ | ||
public readonly bool Value; | ||
|
||
public StripSubstitutionsAttribute (bool value) | ||
{ | ||
Value = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tProcessedWhenBlacklistStepIsDisabled.xml → ...leIsNotProcessedWithIgnoreDescriptors.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<linker> | ||
<assembly fullname="test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | ||
<type fullname="Mono.Linker.Tests.Cases.Resources.EmbeddedLinkXmlFileIsNotProcessedWhenBlacklistStepIsDisabled/Unused" /> | ||
<type fullname="Mono.Linker.Tests.Cases.Resources.EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptors/Unused" /> | ||
</assembly> | ||
</linker> |
5 changes: 5 additions & 0 deletions
5
...sources/Dependencies/EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptorsAndRemoved.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<linker> | ||
<assembly fullname="test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | ||
<type fullname="Mono.Linker.Tests.Cases.Resources.EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptorsAndRemoved/Unused" /> | ||
</assembly> | ||
</linker> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...Tests.Cases/Resources/EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptorsAndRemoved.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using Mono.Linker.Tests.Cases.Expectations.Assertions; | ||
using Mono.Linker.Tests.Cases.Expectations.Metadata; | ||
|
||
namespace Mono.Linker.Tests.Cases.Resources | ||
{ | ||
[SetupLinkerCoreAction ("link")] | ||
[IgnoreDescriptors (true)] | ||
[StripDescriptors (true)] | ||
|
||
// We need to rename the resource so that it matches the name of an assembly being processed. This is a requriement of the black list step | ||
[SetupCompileResource ("Dependencies/EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptorsAndRemoved.xml", "test.xml")] | ||
[SkipPeVerify] | ||
[RemovedResourceInAssembly ("test.exe", "test.xml")] | ||
public class EmbeddedLinkXmlFileIsNotProcessedWithIgnoreDescriptorsAndRemoved | ||
{ | ||
public static void Main () | ||
{ | ||
} | ||
|
||
public class Unused | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
test/Mono.Linker.Tests.Cases/Substitutions/Dependencies/EmbeddedSubstitutionsKept.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<linker> | ||
<assembly fullname="test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | ||
<type fullname="Mono.Linker.Tests.Cases.Substitutions.EmbeddedSubstitutionsKept"> | ||
<method signature="System.Void ConvertToThrowMethod()" body="remove" /> | ||
</type> | ||
</assembly> | ||
</linker> |
7 changes: 7 additions & 0 deletions
7
...s/Substitutions/Dependencies/EmbeddedSubstitutionsNotProcessedWithIgnoreSubstitutions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<linker> | ||
<assembly fullname="test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | ||
<type fullname="Mono.Linker.Tests.Cases.Substitutions.EmbeddedSubstitutionsNotProcessedWithIgnoreSubstitutions"> | ||
<method signature="System.Void ConvertToThrowMethod()" body="remove" /> | ||
</type> | ||
</assembly> | ||
</linker> |
Oops, something went wrong.