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
path: root/linker
AgeCommit message (Collapse)Author
2017-10-19Find 'linker' child element rather than assuming it's the first element in ↵Jonathan Chambers
the file. This allows link xml files to contain comments at the start.
2017-10-11Improve dependency dumpingRadek Doulik
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 ... ```
2017-09-22Add ILLink.CustomsSteps.dll.Eugene Rozenfeld
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.
2017-09-13Improve loggingRadek Doulik
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.
2017-08-24Adds more type-forwarder testsMarek Safar
2017-08-23Don't crash on any wrong type forwader referenceMarek Safar
2017-08-23Sync up with NiceIO at ↵Mike Voorhees
https://github.com/lucasmeijer/NiceIO/commit/30c78865094183c4aebe9f2094faa4f4497a1fcd
2017-08-21Fixes failing IL testMarek Safar
2017-08-21Merge branch 'Unity-Technologies-master-compile-setup-refs'Marek Safar
2017-08-19Add ability to compile assemblies before and after a test caseMike Voorhees
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
2017-08-18Don't throw during test cases build process (most runner cannot handle it)Marek Safar
2017-08-18Testing support for adding the KeepTypeForwarderOnlyAssembliesMike Voorhees
KeepTypeForwarder arg handling fix.
2017-08-17Don't include BlackListStep in atest run by defaultMarek Safar
2017-08-15Extension point for setting up pedump processMike Voorhees
2017-08-02[linker] added workaround for invalid type forwardsRadek Doulik
- 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
2017-08-02Provide 'event' and 'property' elements support with Link XML step.Vladislav Rishe
2017-08-02Fix LinkingOfCoreLibrariesRemovesUnusedTypes failing on WindowsMike Voorhees
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
2017-07-28Enable test that needed mono 5.2 or higher to workMike Voorhees
2017-07-26Run peverify on the output assembliesMike Voorhees
2017-07-26[linker] Provide the inner exception when throwing ↵Rolf Bjarne Kvinge
AssemblyResolutionExceptions to ease debugging.
2017-06-09Set up task package to build for multiple tfms (#129)Sven Boemer
2017-06-07Verify behavior with no preserve attribute in XMLJosh Peterson
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.
2017-06-06Make arg builder more extensibleMike Voorhees
2017-06-06Improve annotations tracking in some placesMike Voorhees
Override ToString in ResolveFromXmlStep Break recursive chains in the xml report
2017-06-05Make GetAssemblies virtualMike Voorhees
2017-05-31Add some tests for situation where interface method is removedMike Voorhees
2017-05-31Test framework extensibility improvementsMike Voorhees
2017-05-31Base attribute for InAssembly attrsMike Voorhees
2017-05-31Better struct support in test frameworkMike Voorhees
2017-05-30This PR fixes stripper stripping attributes that are referenced by interface ↵Mike Voorhees
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.
2017-05-28Switch to explicit references only. No more assuming all .dlls in the ↵Mike Voorhees
sandboxed directory are meant to be passed as references when compiling the test cases
2017-05-17Unresolved type handling for top level attributesMike Voorhees
2017-05-16Remove out of date descriptorsMarek Safar
2017-05-16Add ability to preserve an entire assemblyMike Voorhees
2017-05-16Make assembly and module attribute marking slightly less conservative.Mike Voorhees
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
2017-05-13Remove fields from attributes in expectations assemblyMike Voorhees
2017-05-13More resolution clean up in ResultCheckerMike Voorhees
Allow multiple [Reference] attributes
2017-05-12Improve assembly resolution in ResultCheckerMike Voorhees
Add support for string type name in *InAssemblyAttributes so that non-public types can be checked
2017-05-12Small ShouldParseMethodBody optimizationMarek Safar
2017-05-11Ignore LinkingOfCoreLibrariesRemovesUnusedTypes. Requires mono 5.2 on OSX ↵Mike Voorhees
agent to pass
2017-05-11Add a test for copying of core assembliesMike Voorhees
2017-05-11Implement Kept & Removed Member in assemblyMike Voorhees
2017-05-11Implement Kept & Removed attributes for TypeInAssembly.Mike Voorhees
This allowed for the core link test to be implemented
2017-05-11Add tests for ComImport casesMike Voorhees
2017-05-10Add .NET Core SDK tasks and targetsSven Boemer
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.
2017-05-10Add support for writing pure IL for R2R assemblies (#99)Sven Boemer
2017-05-09Change some test cases to use types that have not been moved around in newer ↵Mike Voorhees
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
2017-05-09Test framework (#101)Marek Safar
2017-05-04FIX : Removal of wrong overloaded method in generic classMike Voorhees
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
2017-05-04FIX - GenericParam count on method not taken intoMike Voorhees
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