Age | Commit message (Collapse) | Author |
|
the file. This allows link xml files to contain comments at the start.
|
|
Push actual custom attribute type instead of cecil custom attribute
instance. It also makes dependency graph more spread as we have more
vertices instead of one overused.
So for example we now have:
`TypeDef:System.Runtime.InteropServices.ComVisibleAttribute`
vertex instead of `Other:Mono.Cecil.CustomAttribute`
Do not add predicate method to the dependencies. It doesn't add much
value and makes the graph having vertex with too many edges, so we had
a lot of vertices with 15k+ total dependencies in flat view for XA
template application. Like:
```
Distance | TypeDef:Android.App.ActivityAttribute [total deps: 15100]
------------------------------------------------------------------------
1 | Method:System.Void Android.App.ActivityAttribute::.ctor()
2 | Other:Mono.Cecil.CustomAttribute
3 | TypeDef:System.Object
...
```
Now we have:
```
Distance | TypeDef:Android.App.ActivityAttribute [total deps: 9]
------------------------------------------------------------------------
1 | Method:System.Void Android.App.ActivityAttribute::.ctor()
2 | TypeRef:Android.App.ActivityAttribute
3 | TypeDef:XATemplateLA.MainActivity
...
```
|
|
Clean up corebuild to make sure all output is placed in bin or tools
subdirectories.
Add the first ILLInk custom step to clear InitLocals on all methods.
|
|
Added the ILogger interface for logging messages from the
linker. There is a new default implementation, the ConsoleLogger
class, which just continues to use simple S.C.WriteLine as before.
The LinkerContext newly contains Logger property, which can be set to
instance of class implementing ILogger interface. As an example,
Xamarin.Android linker will be able to provide own logger, forwarding
the messages to Microsoft.Build.Utilities.TaskLoggingHelper. This way
it will be possible to see linker messages, depending on the actual
msbuild's verbosity level, in the XA build output.
|
|
|
|
|
|
https://github.com/lucasmeijer/NiceIO/commit/30c78865094183c4aebe9f2094faa4f4497a1fcd
|
|
|
|
|
|
Can now compile .il files into assemblies
Add support for [Define] to set defines for a test case
Implement some basic type forwarding test cases
|
|
|
|
KeepTypeForwarder arg handling fix.
|
|
|
|
|
|
- fixes #57645
- ignore invalid forwards of nested types of exported forwarded
types, which were added by a bug in csc. description by Marek Safar
from https://bugzilla.xamarin.com/show_bug.cgi?id=57645#c13
Native csc (pre-Roslyn version) when encountered typeforwarded
type it added automatically all its nested types including
private/protected/internal ones. This bug was fixed in Roslyn
csc but there are still many assemblies compiled with native csc
(pre VS2015) which can have typeforwarded typeref to a type which
is not available because it's not included in public API.
- ignoring these forwarders here should be harmless, because if these
types were used somewhere in the application, the linker would fail
in the mark step, when trying to resolve the typereference to them
- also added throwing the LoadException in case of missing non-nested
forwarded exported types, instead of just crashing with
System.NullReferenceException
|
|
|
|
Skip PeVerifying of System.dll and System.Configuration.dll. PeVerify
reports problems in the unlinked mono class lib version of these
assemblies as well as the .NET Framework version. Also change the types
used by this test. Use types that exist in mono AOT profiles
|
|
|
|
|
|
AssemblyResolutionExceptions to ease debugging.
|
|
|
|
If a link.xml file has an assembly or type element that does not have
a preserve atttribute, treat that as if it is preserve="all". These two
tests verify the existing behavior.
|
|
|
|
Override ToString in ResolveFromXmlStep
Break recursive chains in the xml report
|
|
|
|
|
|
|
|
|
|
|
|
implementations.
As far as I'm aware, this only impacts winrt.
We added a new test to our WinRT test suite to verify this behavior, however since our winrt support has not been sent upstream, I am not able to include a test for this change.
|
|
sandboxed directory
are meant to be passed as references when compiling the test cases
|
|
|
|
|
|
|
|
Currently we mark everything. With this change we will not mark assembly and module attributes when their defining module has not been marked after processing all types.
This fixes the test ReferencesAreRemovedWhenAllUsagesAreRemoved when ran against the .NET Framework. When this test was ran against the .NET Framework, System.dll was being kept around because of the assembly attribute BitmapSuffixInSatelliteAssemblyAttribute, which is itself defined in System.dll.
Add a command line option to disable the blacklist step
Fixed bug with ResultChecker treating [RemovedAssembly] the same
as [KeptAssembly]
For the test cases, disable options that tend to pollute the linked output
with a bunch of preservations that are not needed for our very narrow test cases
I did not write a unit test for this case because (a) it would be tricky to do at the moment and (b) we are overly conservative with attributes as a whole and attribute linking need to be reviewed. When that happens, we can pin down the exact behavior we want. The goal of this PR is to get ReferencesAreRemovedWhenAllUsagesAreRemoved passing.
Add Il8n and Blacklist option attributes.
Only disable these things during the test that needs to
|
|
|
|
Allow multiple [Reference] attributes
|
|
Add support for string type name in *InAssemblyAttributes so that non-public types can be checked
|
|
|
|
agent to pass
|
|
|
|
|
|
This allowed for the core link test to be implemented
|
|
|
|
This adds a project that produces the NuGet package ILLink.Tasks,
which contains MSBuild tasks and targets that integrate the linker
with the .NET Core SDK.
Make linker a part of the publish pipeline
We want to introduce a target that runs the linker during the
publish pipeline. The publish pipeline has a target called
ComputeFilesToPublish, which computes the ItemGroup
ResolvedFileToPublish. To extend this target, we have two options:
1. Insert a target before ComputeFilesToPublish. Our target
would rewrite the relevant inputs (@(IntermediateAssembly) and
@(ResolvedAssembliesToPublish)). This lets ComputeFilesToPublish
be ignorant of the linker, but changes the meaning of
IntermediateAssembly and ResolvedAssembliesToPublish.
2. Insert a target after ComputeFilesToPublish. Our target would
pick apart ResolvedFileToPublish, pass some of the resolved
files to the linker, and reconstruct ResolvedFileToPublish to
include the linked assemblies. To pick apart
ComputeFilesToPublish, we break it back down into
IntermediateAssembly and ResolvedAssembliesToPublish. This
avoids changing the meaning of IntermediateAssembly and
ResolvedAssembliesToPublish, but makes it difficult for future
extensions to modify ResolvedFileToPublish (since they will need
to rely on the order in which AfterTargets run).
We'll go with option 1, for simplicity. These itemgroups should
be rewritten even during incremental build, so that publish
takes assemblies from the linked directory.
This commit also includes response to some PR feedback:
- Rename link task from "Link" to "ILLink"
- Compute excluded roots from a list of packages
- Make most targets and itemgroups private
- Turn off the size comparison report by default
- Note behavior of roots vs xml files in comment
This adds simple integration tests for:
- helloworld
- musicstore
- webapi
Each integration test will set up a project (by doing a git clone in
the case of musicstore), add the linker package (which is assumed to
have been built locally), and run the linker.
|
|
|
|
framework versions
System.Func used to live in System.Core, now it's in mscorlib. As a result, when we run our unit tests against our old mono they fail because the tests only reference mscorlib right now.
We could add a reference to System.Core.dll, but there's really no reason why we need to use System.Func, so let's use IDictionary isntead
|
|
|
|
Fixed case 691404.
Branch used was scripting/il2cpp/case691404.
Changeset was 6a7a50281a05. And test changeset was 956d73e9e987
Undo the fix for [#30488]
The change was made at
https://github.com/mono/linker/commit/6f0742cdc4cdbd7627b765992e2e5baeb5edbe58
This fix was wrong and introduced other problems. For example, a test
with the following code would fail because
`System.Linq.Enumerable/WhereSelectEnumerableIterator`2::Select(System.Func`2<TResult,TResult2>)`
was incorrectly stripped
var res = GetSomeCollection().Sum();
In the UnityLinker we fixed this awhile ago by adding more exhaustive
generic parameter checking. The fix here is to remove the change made
upstream and leverage the more exhaustive approach that was committed in
an earllier changeset
|
|
consideration. Could result in a base class method with the same name
as a derived method, but a different number of generic parameters , not
being stripped
We commited this change to our Mono.Linker as part of a different
unrelated fix at c740c07ad4b5 ~2 years ago. No test was added at the
time, but a test has been added to our upgrade branch
|