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
2018-01-22Add missing null checks to TypeReferenceExtensionsmono-2017-10Sebastien Pouliot
Cecil's MetadataResolver returns null if it cannot resolve something. This requires the callers, like TypeReferenceExtensions, to do null checks, otherwise a `NullReferenceException` can happens in the linker code and it's not possible to give a useful error message to the developer. This is what's happening in https://github.com/xamarin/xamarin-macios/issues/3215 (with test case) and likely in https://github.com/xamarin/xamarin-macios/issues/3210 (without test case)
2018-01-17Add missing checks for property variants when looking for property backing ↵Marek Safar
field. Fixes #213
2017-11-22Add test to ensure interfaces aren't removed even if not used.Rolf Bjarne Kvinge
2017-11-22Make interface marking overridable by derived classes.Rolf Bjarne Kvinge
Make interface marking overridable by derived classes, so that derived classes can decide whether an interface implementation should be marked or not. Also remove any non-marked interface implementations.
2017-11-19Multiple [SandboxDependency] attributes are supported and should have been ↵Michael Voorhees
allowed
2017-11-16Add CopyUsed assembly action.Eugene Rozenfeld
CopyUsed action specifies that the assembly should be copied intact if and only if it is used (i.e., marked).
2017-11-15Add an option to ignore unresolved types and methods.Eugene Rozenfeld
With this change the linker won't throw if it encounters an unresolved type or method during MarkStep and -n true was specified.
2017-11-15Add a switch to specify action on user assemblies.Eugene Rozenfeld
Add -u switch to specify action on user (non-core) assemblies similar to -c switch for core assemblies.
2017-10-26Implement removal of link xml resources that were processedMike Voorhees
2017-10-25Add back PrepForLink method for customization purposesMike Voorhees
2017-10-24Reframe alternate dest as file name onlyMike Voorhees
Rather than relative path. The sandboxing code isn't really setup to allow files being placed in arbitrary sub directories.
2017-10-24Implement tests for processing of embedded link xml resourcesMike Voorhees
2017-10-23Add ability to customize the name of the output assembly in testsMike Voorhees
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