Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move linker to runtime #77149

Closed
wants to merge 2,565 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
2565 commits
Select commit Hold shift + click to select a range
5fcf5b2
Add EnableAotAnalyzer as compiler visible
tlakollo Feb 25, 2022
0bea8ef
Merge pull request dotnet/linker#2655 from dotnet/tlakollo-patch-1
tlakollo Feb 25, 2022
633b42e
Understand String.Empty (dotnet/linker#2653)
sbomer Feb 25, 2022
8f9ee45
Fix Typo in test failure warning (dotnet/linker#2660)
jtschuster Feb 25, 2022
f5f5782
Share intrinsic handling of GetMember and similar APIs (dotnet/linker…
vitek-karas Feb 28, 2022
53dd873
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Feb 28, 2022
c9a7186
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Feb 28, 2022
92d9b50
Fix behavior of intrinsics with empty inputs (dotnet/linker#2652)
sbomer Feb 28, 2022
523e771
Remove mention of PreserveDependencyAttribute from docs (dotnet/linke…
sbomer Mar 1, 2022
27fcd6b
Share intrinsics for Expression.Property and Field (dotnet/linker#2671)
vitek-karas Mar 1, 2022
b3b639d
Remove special logic for TypeConverterAttribute (dotnet/linker#2659)
jtschuster Mar 1, 2022
2248c60
Don't dispose of linked assembly in VerifyLinkingOfOtherAssemblies (d…
mrvoorhe Mar 2, 2022
711b59e
Add testcase for intrinsic with override (dotnet/linker#2674)
sbomer Mar 2, 2022
388039e
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Mar 7, 2022
6efba4b
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 7, 2022
a45e92d
Remove fixing-warnings.md and link to dotnet/docs (dotnet/linker#2645)
jtschuster Mar 8, 2022
63d67fa
Expose GetTypePreserve (dotnet/linker#2679)
mrvoorhe Mar 10, 2022
61cf245
Use attributes on lambdas in tests (dotnet/linker#2682)
sbomer Mar 11, 2022
ed78135
Share Type.Base intrinsic (dotnet/linker#2681)
vitek-karas Mar 11, 2022
2c6959e
Warn on DAM mismatch between overrides (dotnet/linker#2656)
jtschuster Mar 11, 2022
e5c1e22
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Mar 14, 2022
e6d61e7
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 14, 2022
60f4498
Remove SuppressionContextMember (dotnet/linker#2691)
sbomer Mar 18, 2022
3329287
Propagate DynamicallyAccessedMemberTypes through Nullable<T> to T (do…
jtschuster Mar 18, 2022
4425957
Create shared WellKnownTypes enum (dotnet/linker#2692)
jtschuster Mar 18, 2022
f2af716
Fix empty/null handling for Type.BaseType intrinsic (dotnet/linker#2694)
sbomer Mar 18, 2022
c6659b7
Add tests for analyzer null references in byte array COM interop (dot…
jtschuster Mar 18, 2022
1bac0d4
Add test get interfaces (dotnet/linker#2696)
sbomer Mar 18, 2022
22ee6b1
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Mar 21, 2022
9cf9a33
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 21, 2022
f6a81b6
Avoid running GetDisplayNameTests in parallel (dotnet/linker#2701)
tlakollo Mar 21, 2022
58bf9cd
Update array data flow test (dotnet/linker#2704)
jtschuster Mar 23, 2022
a193b58
Don't let RUC on cctor silence warnings (dotnet/linker#2705)
sbomer Mar 24, 2022
00d3eb2
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Mar 28, 2022
50ed201
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 28, 2022
09905d7
Lambda and local function suppressions (dotnet/linker#2689)
sbomer Mar 30, 2022
4db2f5c
Files in linker repository now have the same license header at the be…
tlakollo Mar 31, 2022
ab65c64
Break up ValueNode.cs so each Value has it's own file (dotnet/linker#…
jtschuster Apr 1, 2022
d5ff8a6
Fix headers in new files (dotnet/linker#2716)
sbomer Apr 1, 2022
029de02
Fix IndexOutOfRangeException (dotnet/linker#2717)
sbomer Apr 1, 2022
1948eaa
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Apr 4, 2022
13a5a08
Fix local function called from method and state machine (dotnet/linke…
sbomer Apr 5, 2022
d000f06
Don't throw on write to get-only property (dotnet/linker#2728)
sbomer Apr 6, 2022
79200be
Share GetConstructor intrinsic a lot of small fixes (dotnet/linker#2725)
vitek-karas Apr 6, 2022
e0fc7e0
Add constant propagation through methods with parameters or complex b…
marek-safar Apr 7, 2022
f6c78d1
Avoid analyzing cref for generic parameters (dotnet/linker#2732)
tlakollo Apr 8, 2022
d3eccf4
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Apr 11, 2022
3b017fe
Don't remove unused interfaces in library mode (dotnet/linker#2711)
jtschuster Apr 12, 2022
0696838
Aot analyzer class support (dotnet/linker#2738)
tlakollo Apr 13, 2022
b709695
Condition out the BannedApiAnalyzers usage in source-build (dotnet/li…
MichaelSimons Apr 14, 2022
03791e8
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Apr 18, 2022
b958eb9
Handle multiple values for an array node (dotnet/linker#2744)
tlakollo Apr 19, 2022
73c3e1f
Move parameter annotation checks to shared code for analyzer (dotnet/…
jtschuster Apr 19, 2022
b09c959
Add support for Debug output in Analyzer (dotnet/linker#2750)
tlakollo Apr 19, 2022
18e8097
Support assignment to flow capture references (dotnet/linker#2730)
sbomer Apr 20, 2022
b7d371e
Fix array dataflow tests (dotnet/linker#2752)
sbomer Apr 20, 2022
84cb288
Trim static interfaces (dotnet/linker#2741)
jtschuster Apr 20, 2022
f51da34
Don't throw on NoneOperation (dotnet/linker#2753)
sbomer Apr 20, 2022
24df782
Share method handle related intrinsics (dotnet/linker#2754)
vitek-karas Apr 21, 2022
c81a38e
Use WellKnownType in more places and add mapping to MetadataType (dot…
jtschuster Apr 21, 2022
9d7c1e1
Remove AnalysisContext and ScopeStack from method body scanner (dotne…
sbomer Apr 21, 2022
f6a6aa5
Fix handling of special intrinsics in analyzer (dotnet/linker#2756)
vitek-karas Apr 22, 2022
7a68aa0
Share MakeGeneric.. and Expression.Call (dotnet/linker#2758)
vitek-karas Apr 25, 2022
7491783
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Apr 25, 2022
b16fe51
Move shared dataflow value creation helpers out of HandleCallAction (…
sbomer Apr 25, 2022
1df17ac
Add a test for RUC on type with override method (dotnet/linker#2764)
vitek-karas Apr 26, 2022
4ad23a2
Factor ReflectionMethodBodyScanner to be more similar to analyzer (do…
sbomer Apr 26, 2022
db06f03
Fix various issues in tlens that prevented running it against a Xamar…
akoeplinger Apr 26, 2022
49aa059
Change requires on type checking for mismatch (dotnet/linker#2766)
tlakollo Apr 26, 2022
83279b1
Make FlowAnnotations and ReflectionAccessAnalyzer structs (dotnet/lin…
sbomer Apr 27, 2022
5f3ddb2
Don't throw on InstanceReference assignment (dotnet/linker#2772)
sbomer Apr 29, 2022
0624a52
Share Type.GetType and similar intrinsics (dotnet/linker#2773)
vitek-karas Apr 29, 2022
fa1c5b9
Don't remove MethodImpl if overridden method is not in a link assembl…
jtschuster Apr 29, 2022
3a43f07
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] May 2, 2022
24521fd
Add ability for the analyzer to recognize const fields (dotnet/linker…
vitek-karas May 2, 2022
64adcdc
Adds support for recognizing more integer types as consts (dotnet/lin…
vitek-karas May 3, 2022
d18bd5f
Don't depend on marking order in DAM type hierarchy (dotnet/linker#2777)
sbomer May 3, 2022
c07faaf
Fix warning about duplicate attributes (dotnet/linker#2780)
sbomer May 3, 2022
1718dda
Fix NullReferenceException when sweeping unused static interface (dot…
vitek-karas May 5, 2022
398a848
Revert static interface trimming (dotnet/linker#2784)
jtschuster May 6, 2022
d4e7d66
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] May 9, 2022
87e64eb
Match analyzer and linker requires methods (dotnet/linker#2788)
tlakollo May 10, 2022
bee4931
[main] Update dependencies from dotnet/arcade (dotnet/linker#2719)
dotnet-maestro[bot] May 11, 2022
ab2bd0e
Record trim analysis patterns in scanner (dotnet/linker#2782)
sbomer May 12, 2022
0f2faf2
Add sanity check for overrides (dotnet/linker#2793)
jtschuster May 13, 2022
0422829
Retarget product binaries to .NET 6 (dotnet/linker#2794)
vitek-karas May 15, 2022
a48c81a
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] May 16, 2022
f6950a8
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] May 16, 2022
ad2e12c
Split up ReflectionMethodBodyScanner (dotnet/linker#2796)
sbomer May 19, 2022
8e8144d
Consider side effects when evaluating manually substituted methods (d…
marek-safar May 19, 2022
1eb466a
Add retargeting switch labels to ILProcessor (dotnet/linker#2801)
marek-safar May 20, 2022
8dba253
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] May 23, 2022
3249cdb
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] May 23, 2022
833ad0d
Track attributes through Roslyn-generated types (dotnet/linker#2786)
agocke May 24, 2022
d242d6e
Better tests for attribute dataflow (dotnet/linker#2804)
vitek-karas May 24, 2022
9af3455
Warn on mismatch for ref params (dotnet/linker#2769)
jtschuster May 25, 2022
e14b322
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] May 30, 2022
ad7f96e
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] May 30, 2022
97981c4
Warn on unhandled store in reference case instead of throwing (dotnet…
jtschuster May 31, 2022
aa820d2
Don't crash analyzer for ref-return assignment (dotnet/linker#2810)
sbomer May 31, 2022
d512298
Add two specific tests for type hierarchy marking (dotnet/linker#2814)
vitek-karas Jun 1, 2022
1f15bb6
Changes to make sharing code with Native AOT easier (dotnet/linker#2818)
vitek-karas Jun 3, 2022
f0737f2
Don't warn on enum switch if named values are exhaustive (dotnet/link…
jtschuster Jun 3, 2022
e0dae3e
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Jun 6, 2022
d38e869
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jun 6, 2022
2e987e8
Scan compiler-generated methods as a group (dotnet/linker#2792)
sbomer Jun 7, 2022
dcfe8ec
Add test for /~https://github.com/dotnet/linker/issues/2819 (dotnet/lin…
vitek-karas Jun 7, 2022
bd94741
Fix linker crash in generated type analysis (dotnet/linker#2827)
agocke Jun 8, 2022
3fdf0eb
Add a test for IReflect which simulates usage from winforms (dotnet/l…
vitek-karas Jun 10, 2022
c492274
Fix access to derived properties (dotnet/linker#2829)
sbomer Jun 10, 2022
3db5605
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Jun 13, 2022
a7762df
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jun 13, 2022
659bcb5
Fix analyzer issues related to visiting assignment targets (dotnet/li…
sbomer Jun 13, 2022
1b18095
Mark all type forwarders used during string->Type resolution (dotnet/…
vitek-karas Jun 13, 2022
736d0f1
Don't catch all exceptions; propagate unexpected errors to trigger Wa…
jtschuster Jun 13, 2022
347293b
Re-add static interface trimming with more testing (dotnet/linker#2791)
jtschuster Jun 14, 2022
26fe218
Move the ILLink targets from the SDK repo to the linker repo (dotnet/…
agocke Jun 14, 2022
a8bd538
Adjust ref param kind check for IL offset (dotnet/linker#2838)
jtschuster Jun 15, 2022
83e96a6
Analyze implicit indexer reference operations (dotnet/linker#2839)
sbomer Jun 15, 2022
7a5d3a7
Revert "Re-add static interface trimming with more testing (dotnet/li…
jtschuster Jun 16, 2022
d3e6515
Include targets in ILLink.Tasks package (dotnet/linker#2844)
sbomer Jun 16, 2022
10e0bda
Disable invalid assert and add a test to repro the problem (dotnet/li…
vitek-karas Jun 20, 2022
63f6df4
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jun 20, 2022
59bc964
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Jun 20, 2022
99140e9
Fix package props for older SDKs (dotnet/linker#2848)
sbomer Jun 20, 2022
657a094
Seal classes to silence warnings in Preview 5 (dotnet/linker#2852)
jtschuster Jun 20, 2022
e7624e0
Update Cecil to pick up PDB fix /~https://github.com/mono/cecil/pull/34…
vitek-karas Jun 23, 2022
70fccc4
Update ref package used by analyzer tests to Preview 5 (dotnet/linker…
vitek-karas Jun 23, 2022
d45c523
Keep unresolved interface impl (dotnet/linker#2858)
jtschuster Jun 24, 2022
6231ab3
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jun 27, 2022
0450d9b
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Jun 27, 2022
742f5a3
Implement .dgml writing capabilities (dotnet/linker#2854)
iserrato Jun 28, 2022
233fc93
Fix assignment to captured invalid operation (dotnet/linker#2869)
sbomer Jun 29, 2022
894d09d
Add compiler-generated code dataflow analysis (dotnet/linker#2842)
sbomer Jun 29, 2022
609cca8
Small updates to help with linker->aot port (dotnet/linker#2873)
vitek-karas Jul 1, 2022
ea9ab9b
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Jul 4, 2022
ce01945
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jul 4, 2022
c869b10
Fixed AddSuppresionsBeforeAttributeRemoval test (dotnet/linker#2882)
jkurdek Jul 7, 2022
4fdaf21
Add more trimming options to TrimMode and change defaults (dotnet/lin…
agocke Jul 7, 2022
a40adc2
Refactorings to help with linker->AOT integration (dotnet/linker#2883)
vitek-karas Jul 9, 2022
2a8227d
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jul 11, 2022
bab6a8b
Add a test for unsupported branch instruction crash (dotnet/linker#2887)
vitek-karas Jul 12, 2022
00e42a0
Intentionally skip switch instructions during branch removal as the c…
vitek-karas Jul 12, 2022
784fede
Preserve all interfaces in library mode (dotnet/linker#2886)
jtschuster Jul 12, 2022
4bf1bcf
Fix a bug with null value passed to annotated parameter on attribute …
vitek-karas Jul 14, 2022
982d2b8
Analyze nested functions in Roslyn analyzer (dotnet/linker#2892)
sbomer Jul 15, 2022
1c77e69
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jul 18, 2022
6f6e4a6
Update Cecil to pick up PDB fix (dotnet/linker#2901)
vitek-karas Jul 19, 2022
fa43f73
Fix syntax node scope and nullable warnings (dotnet/linker#2900)
agocke Jul 20, 2022
2fa20c3
Add a test for stack overflow when marking lambda which indirectly ma…
vitek-karas Jul 20, 2022
9a8f2c0
Redundant warning suppressions detection (dotnet/linker#2891)
jkurdek Jul 21, 2022
5340b8c
Fix re-entrancy when marking nested functions (dotnet/linker#2907)
sbomer Jul 21, 2022
37a73e6
Avoid dataflow analysis for generic parameters (dotnet/linker#2908)
sbomer Jul 21, 2022
1434c75
Make StaticCs work in source build (dotnet/linker#2909)
agocke Jul 21, 2022
eedc180
DynamicallyAccessedMembers CodeFix (dotnet/linker#2890)
iserrato Jul 25, 2022
d9c3249
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Jul 25, 2022
5e073ae
Map type parameters for static closures (dotnet/linker#2899)
sbomer Jul 26, 2022
3707a37
Synchronize file type between analyzer and linker (dotnet/linker#2917)
iserrato Jul 26, 2022
fe18f19
Add more tests for parameter dataflow (dotnet/linker#2918)
sbomer Jul 26, 2022
99e5df3
Update to .NET 7.0 TFM (dotnet/linker#2919)
lbussell Jul 27, 2022
c1400cf
[main] Update dependencies from dotnet/arcade (dotnet/linker#2884)
dotnet-maestro[bot] Jul 28, 2022
c6f3a67
Added support for suppressions on properties (dotnet/linker#2925)
jkurdek Jul 29, 2022
0f361d9
Add an interesting test case for compiler generated code marking (dot…
vitek-karas Jul 29, 2022
68a6b6a
Make serialization discovery opt-in (dotnet/linker#2929)
sbomer Aug 1, 2022
9f6a97c
Update DAMCodeFixProvider.cs (dotnet/linker#2932)
Youssef1313 Aug 1, 2022
fcd58bd
Add another local function branch removal test (dotnet/linker#2931)
sbomer Aug 1, 2022
c3ae17c
Sync test changes from AOT (dotnet/linker#2912)
vitek-karas Aug 1, 2022
0e33465
Redundant suppressions detection (dotnet/linker#2922)
jkurdek Aug 2, 2022
01652f4
Redundant suppressions support for suppressions on events and propert…
jkurdek Aug 2, 2022
4361681
Separate interface method trimming logic and update for static interf…
jtschuster Aug 3, 2022
96a5d72
New constraint on a generic argument involved in MakeGenericType/Meth…
vitek-karas Aug 4, 2022
e522d58
Adds a test with two annotated out params for the same method. (dotne…
vitek-karas Aug 4, 2022
e33aab6
Improve tests and docs (dotnet/linker#2941)
mrvoorhe Aug 4, 2022
f35559b
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 4, 2022
b8e2e1c
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Aug 4, 2022
d4481ef
Update MSBuild version to fix official build (dotnet/linker#2945)
sbomer Aug 4, 2022
d4f0b87
Include all warnings under suppression setting (dotnet/linker#2930)
sbomer Aug 4, 2022
2e5b893
Use preview 5 framework version in runtimeconfig (dotnet/linker#2948)
sbomer Aug 5, 2022
7d404e9
[analyzer tool] Avoid exceptions when loading dependencies (dotnet/li…
vitek-karas Aug 8, 2022
44c4742
Aot to linker sync (dotnet/linker#2944)
vitek-karas Aug 8, 2022
a571ef1
Fixed IL2121 single warn issue (dotnet/linker#2953)
jkurdek Aug 9, 2022
011aab4
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 9, 2022
a027f21
Build with preview5 SDK (dotnet/linker#2954)
sbomer Aug 9, 2022
eccba9a
Test that basic ref field operations don't crash linker (dotnet/linke…
jtschuster Aug 9, 2022
fee2bb1
Pin compiler version to fix build (dotnet/linker#2958)
sbomer Aug 9, 2022
8120f77
Fix missing parenthesis (dotnet/linker#2956)
sbomer Aug 9, 2022
f74729a
Process static interface methods as virtual methods (dotnet/linker#2926)
jtschuster Aug 11, 2022
b117fa0
Revert analyzer to lower CodeAnalysis version (dotnet/linker#2968)
jtschuster Aug 12, 2022
b60d366
Added IL2121 to error-codes.md (dotnet/linker#2964)
jkurdek Aug 12, 2022
9e7bdbf
Fix il corruption (dotnet/linker#2966)
sbomer Aug 12, 2022
ffdcf15
Dataflow support for ref fields (dotnet/linker#2947)
jtschuster Aug 12, 2022
21c440a
Fix exception when generating warning for method definition (dotnet/l…
vitek-karas Aug 12, 2022
4e75a56
Add MakeGenericMethod tests for static interface methods (dotnet/link…
jtschuster Aug 15, 2022
ee43bd2
Add IL Verification to tests (dotnet/linker#2960)
jtschuster Aug 15, 2022
60e99cc
Suppress warning in instance fields if the instance constructors are …
tlakollo Aug 15, 2022
8e5af0a
Use HashSet instead of List for _virtual_methods (dotnet/linker#2976)
jtschuster Aug 16, 2022
015cfd4
Add test for dotnet/runtimedotnet/linker#73048 (dotnet/linker#2977)
MichalStrehovsky Aug 17, 2022
a67ebf3
Don't track current field of state machines (dotnet/linker#2979)
sbomer Aug 17, 2022
8c295a7
CodeFix Support for Additional DAM IDs (dotnet/linker#2939)
iserrato Aug 18, 2022
8e40f0b
IL2121 warnings point to XML files correctly (dotnet/linker#2965)
jkurdek Aug 18, 2022
1776452
Generate attribute in Code Fix (dotnet/linker#2985)
iserrato Aug 19, 2022
8c6f47f
Add documentation (dotnet/linker#2989)
iserrato Aug 23, 2022
f3d31d4
Check variable type in ValidateNoReferencesToReferences instead of da…
jtschuster Aug 23, 2022
b2437ee
Add support for generic attributes (dotnet/linker#2980)
sbomer Aug 23, 2022
cabc760
Add generated test (dotnet/linker#2995)
jtschuster Aug 23, 2022
6b5e37e
CodeFixer enhancements (dotnet/linker#2994)
tlakollo Aug 23, 2022
6ac7820
Do not report redundant suppressions on trimmed members (dotnet/linke…
jkurdek Aug 25, 2022
69cc1e2
Suppress warnings in 6.0 framework (dotnet/linker#3000)
sbomer Aug 25, 2022
bf57dbb
Don't suppress all warnings with SuppressTrimAnalysisWarnings (dotnet…
sbomer Aug 25, 2022
61ac4ff
[main] Update dependencies from dotnet/arcade (dotnet/linker#2950)
dotnet-maestro[bot] Aug 26, 2022
e966196
Use enum for method parameter indexing (dotnet/linker#2993)
jtschuster Aug 29, 2022
faa322a
Annotated TestSystemTypeBase (dotnet/linker#3008)
jkurdek Aug 29, 2022
11af0c1
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Aug 30, 2022
244e25c
Verify if COM dangerous during call site check (dotnet/linker#3009)
jkurdek Aug 31, 2022
6eecc0c
[main] Update dependencies from dotnet/runtime (dotnet/linker#2974)
dotnet-maestro[bot] Sep 1, 2022
6fed335
Update public pool names (dotnet/linker#3013)
alexperovich Sep 1, 2022
bd2bb82
Fixes a null ref which happens when an XML comment cref contains gene…
vitek-karas Sep 1, 2022
668d000
Allow codefixer to annotate accessor declarations as methods (dotnet/…
tlakollo Sep 1, 2022
d707852
Sync AOT tests with linker (dotnet/linker#3026)
tlakollo Sep 6, 2022
3138b2c
Fix lint command (dotnet/linker#3027)
tlakollo Sep 8, 2022
c678f44
Fix how keeping something due to DynamicDependency is traced (dotnet/…
vitek-karas Sep 15, 2022
304e1ca
Better warning message for DynamicDependency problem (dotnet/linker#3…
vitek-karas Sep 16, 2022
c27a0a3
[main] Update dependencies from dotnet/arcade (dotnet/linker#3023)
dotnet-maestro[bot] Sep 19, 2022
eb6d176
[main] Update dependencies from dotnet/runtime (dotnet/linker#3024)
dotnet-maestro[bot] Sep 19, 2022
229f829
Remove --keep-facades option (dotnet/linker#3036)
sbomer Sep 19, 2022
cdfa89e
Cleanup tests for cases which use different warnings codes that the t…
vitek-karas Sep 21, 2022
87f3ac1
Add event source tracing (dotnet/linker#3043)
jtschuster Sep 21, 2022
fa2e881
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Sep 22, 2022
2cb62ff
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Sep 22, 2022
b7d664c
Update dependencies from /~https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Sep 26, 2022
d433f19
Update dependencies from /~https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Sep 26, 2022
6698128
Check for nulls in IsInterfaceImplementationNeededByTypeDueToInterfac…
jtschuster Sep 27, 2022
12f4ea1
Use new build images (dotnet/linker#3051)
sbomer Sep 27, 2022
01a13e9
Update docker to the latest tagging schema (dotnet/linker#3057)
dkurepa Oct 4, 2022
2ddff0a
Remove redundant checks in IntrinsicId switch statements (dotnet/link…
jtschuster Oct 7, 2022
d615e00
Add Doc comments for IntrinsicIds (dotnet/linker#3063)
jtschuster Oct 14, 2022
2d44ea4
Merge branch 'main' of /home/tlakollo/Consolidation/linker into main
Oct 17, 2022
aaba9e1
Remove arcade eng\common directory in src\tools\linker since now we w…
tlakollo Oct 17, 2022
89d94ed
Add ToolsProjectRoot to identify the tools folder inside runtime
tlakollo Oct 18, 2022
a10d6c4
Run dotnet format on tools\linker
tlakollo Oct 18, 2022
3db6dda
Fix Markdownlint
tlakollo Oct 18, 2022
0ec286d
Remove shared projects from build
Oct 18, 2022
8c6a936
Change WarningSuppressionWriter to use runtime format instead of Mono's
Oct 20, 2022
d016c82
Add Cecil Pdb library otherwise nativePdb reading will throw and all …
tlakollo Oct 24, 2022
0412b85
Update cecil package name to easily differenciate the official packag…
tlakollo Oct 24, 2022
312ac9a
Remove unused gitignore code lines
tlakollo Oct 24, 2022
eb4482e
Format file headers as runtime
tlakollo Oct 24, 2022
7ed5f12
Attempt to run linker unit tests in CI
tlakollo Oct 25, 2022
b654deb
Actually create a test group otherwise CI wont trigger
Oct 26, 2022
10e4841
Exclude src/tools from some of the pipelines so they dont run on link…
Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@

/eng/pipelines/**/*wasm* @radical

# Linker codeowners
/src/tools/linker/ @marek-safar
/src/tools/linker/src/analyzer/ @radekdoulik
/src/tools/linker/src/ILLink.Tasks/ @sbomer
/src/tools/linker/src/ILLink.RoslynAnalyzer/ @sbomer
/src/tools/linker/src/linker/ @marek-safar @mrvoorhe
/src/tools/linker/test/ @marek-safar @mrvoorhe

# Obsoletions / Custom Diagnostics

/docs/project/list-of-diagnostics.md @jeffhandley
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,6 @@ jit32
# performance testing sandbox
sandbox

#IL linker for testing
linker

# Symbolic link for the shared portion of CoreLib to make grep/findstr work for runtime devs
#
# On Windows, make your own by running these commands from the repo root:
Expand All @@ -365,4 +362,4 @@ src/coreclr/System.Private.CoreLib/common

# Temporary artifacts from local libraries stress builds
.dotnet-daily/
run-stress-*
run-stress-*
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer'))</InstallerProjectRoot>
<WorkloadsProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'workloads'))</WorkloadsProjectRoot>
<ToolsProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tools'))</ToolsProjectRoot>
<SharedNativeRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'native'))</SharedNativeRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks'))</RepoTasksDir>
Expand Down
23 changes: 23 additions & 0 deletions THIRD-PARTY-NOTICES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -1175,3 +1175,26 @@ As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into a machine-executable object form of such
source code, you may redistribute such embedded portions in such object form
without including the above copyright and permission notices.

License for Jb Evain
---------------------

Copyright (c) 2006 Jb Evain (jbevain@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
27 changes: 27 additions & 0 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
<SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." />
<SubsetName Include="Clr.ToolsTests" OnDemand="true" Description="Unit tests for the clr.tools subset." />
<SubsetName Include="Tools.Linker" Description="The project that procude the linker and analyzer packages for trimming" />
<SubsetName Include="Tools.LinkerTests" OnDemand="true" Description="The project that procude the linker and analyzer packages for trimming" />
<SubsetName Include="Clr.Packages" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
<SubsetName Include="LinuxDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="AlpineDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86" />
Expand Down Expand Up @@ -326,6 +328,31 @@
Test="true" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(NativeAotSupported)' == 'true'"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.linker+'))">
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\linker\Mono.Linker.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\ILLink.Tasks\ILLink.Tasks.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\analyzer\analyzer.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\linker\ref\Mono.Linker.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\tlens\tlens.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)linker\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj" Category="tools" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.linkertests+'))">
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests\Mono.Linker.Tests.csproj"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be built even in source build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, never mind, I guess we don't need tests for source build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is meant by "source build" please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a nutshell source-build is a requirement from some Linux distributions which require source code to build. So basically when they get dotnet they actually get all the source code (one of those pieces is the runtime, but they are more pieces) and build it. The source-build repository is in charge of taking all of these pieces and glue them together, it also has an explanation of what source build is -> /~https://github.com/dotnet/source-build#source-build-goals
We want all the source code to be included, but the tests are not going to be executed once it's an app like dotnet so we exclude them using the DotNetBuildFromSource variable.

Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj"
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj"
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.Tasks.Tests\ILLink.Tasks.Tests.csproj"
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.RoslynAnalyzer.Tests\ILLink.RoslynAnalyzer.Tests.csproj"
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.RoslynAnalyzer.Tests.Generator\ILLink.RoslynAnalyzer.Tests.Generator.csproj"
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
<!-- Build crossgen2 that will be used to compile System.Private.CoreLib library for CoreCLR -->
<ProjectToBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
Expand Down
8 changes: 8 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@
<Uri>/~https://github.com/dotnet/command-line-api</Uri>
<Sha>5618b2d243ccdeb5c7e50a298b33b13036b4351b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.22524.1">
<Uri>/~https://github.com/dotnet/cecil</Uri>
<Sha>4a51257b6ac207cb7b0a51b34bfb3eab5d0dfae8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Cecil.Pdb" Version="0.11.4-alpha.22524.1">
<Uri>/~https://github.com/dotnet/cecil</Uri>
<Sha>4a51257b6ac207cb7b0a51b34bfb3eab5d0dfae8</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22503.1">
Expand Down
10 changes: 10 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>7.0.100-1.22514.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- Mono Cecil -->
<MicrosoftDotNetCecilVersion>0.11.4-alpha.22524.1</MicrosoftDotNetCecilVersion>
<MicrosoftDotNetCecilPdbVersion>0.11.4-alpha.22524.1</MicrosoftDotNetCecilPdbVersion>
<!-- ILLink dependencies -->
<MicrosoftBuildFrameworkVersion>17.0.0-preview-21267-01</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildUtilitiesCoreVersion>17.0.0-preview-21267-01</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftDotNetApiCompatVersion>8.0.0-beta.22473.1</MicrosoftDotNetApiCompatVersion>
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXunitVersion>1.0.1-beta1.*</MicrosoftCodeAnalysisCSharpAnalyzerTestingXunitVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftILVerificationVersion>7.0.0-preview.7.22375.6</MicrosoftILVerificationVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>8.0.0-alpha.1.22513.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
Expand Down
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"rollForward": "major"
},
"tools": {
"dotnet": "7.0.100-rc.1.22431.12"
"dotnet": "7.0.100-rc.1.22431.12",
"xcopy-msbuild": "17.2.1"
tlakollo marked this conversation as resolved.
Show resolved Hide resolved
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22503.1",
Expand Down
14 changes: 14 additions & 0 deletions src/tools/linker/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Code Style Analyzers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this and use repo-wide global configurations (CodeAnalysis.{src,test}.globalconfig)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already takes into account the CodeAnalysis.{src,test}.globalconfig. This is an override of what's in that file. For example, IDE0005 is not enabled globally because a lot of the files in the runtime have #ifdef that could incorrectly flag unnecessary usings/imports, but in the case of linker we use that rule. The original editorconfig from linker is actually more comprehensive than this file, but since is inheriting most from the globalconfig these were the only remaining items


[*.cs]
# IDE0005: Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = error

# IDE0073: Require file header
dotnet_diagnostic.IDE0073.severity = warning

# IL3000: Avoid accessing Assembly file path when publishing as a single file
dotnet_diagnostic.IL3000.severity = suggestion

# CS0176: Cannot be accessed with an instance ref
dotnet_diagnostic.CS0176.severity = silent
39 changes: 39 additions & 0 deletions src/tools/linker/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project>
<PropertyGroup>
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)' == '' and '$([System.IO.Path]::GetFileName($(MSBuildProjectDirectory)))' == 'ref'">true</IsReferenceAssembly>
<DisableImplicitNamespaceImports_DotNet>true</DisableImplicitNamespaceImports_DotNet>
<!-- The TFM for the product (linker, task,.. not analyzer, which is netstandard) -->
<NetCoreAppToolCurrent>net7.0</NetCoreAppToolCurrent>
<!-- The TFM for all the tests - intentionally different since tests may depend on new framework APIs in order to validate
linker interaction with them, linker itself doesn't need the new framework typically. -->
<NetCoreAppTestsCurrent>net7.0</NetCoreAppTestsCurrent>
</PropertyGroup>
<PropertyGroup Condition=" '$(IsReferenceAssembly)' == 'true' ">
<!-- Since .NET 5 reference assemblies are always produced -->
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<!-- Used by Arcade to compute OutputPath, IntermediateOutputPath, etc. early in the import chain. -->
<OutDirName>$(MSBuildProjectName)/ref</OutDirName>
<!-- Don't try to publish PDBs for ref assemblies that have none. -->
<PublishWindowsPdb>false</PublishWindowsPdb>
<RunApiCompat>false</RunApiCompat>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng/Analyzers.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>/~https://github.com/dotnet/linker</RepositoryUrl>
<!-- Set this to true to build against the package instead of the submodule. -->
<UseCecilPackage Condition="'$(UseCecilPackage)' == ''">true</UseCecilPackage>
<!-- No symbols are produced for ref assemblies, but some parts of the SDK still expect pdbs, so we explicitly tell it there are none. -->
<!-- Must be set after importing Arcade to override its defaults. -->
<DebugType Condition=" '$(IsReferenceAssembly)' == 'true' ">none</DebugType>
</PropertyGroup>

<PropertyGroup>
<LangVersion>preview</LangVersion>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>
</Project>
96 changes: 96 additions & 0 deletions src/tools/linker/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<Import Project="$(_ToolsProjectTargets)" Condition="Exists('$(_ToolsProjectTargets)')" />

<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>


<!-- Shared logic for reference assemblies. This enables apicompat and
packaging logic for projects that have corresponding reference assemblies. -->
<PropertyGroup>
<ContractProject Condition="'$(ContractProject)' == ''">$(MSBuildProjectDirectory)\ref\$(MSBuildProjectName).csproj</ContractProject>
<HasMatchingContract Condition="Exists('$(ContractProject)')">true</HasMatchingContract>
<RunApiCompat Condition="'$(HasMatchingContract)' != 'true'">false</RunApiCompat>
<TargetsForTfmSpecificContentInPackage Condition="'$(HasMatchingContract)' == 'true'">$(TargetsForTfmSpecificContentInPackage);_AddReferenceAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<!-- Work around ApiCompat breaking change /~https://github.com/dotnet/arcade/issues/5361 -->
<ItemGroup Condition="'$(RunApiCompat)' == 'true'">
<_DependencyDirectories Include="$(IntermediateOutputPath)" />
</ItemGroup>
<!-- Add a ProjectReference to the reference assembly project for ApiCompat. -->
<!-- This also ensures that it is built when the current project gets packaged. -->
<ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
<ProjectReference Include="$(ContractProject)">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>ResolvedMatchingContract</OutputItemType>
</ProjectReference>
</ItemGroup>

<!-- The default pack logic will include the implementation assembly in lib.
This also adds the reference assembly under ref. -->
<Target Name="_AddReferenceAssemblyToPackage">
<!-- Get the build output of the reference project, which has been built due to the ProjectReference. -->
<MSBuild Projects="$(ContractProject)" Targets="BuiltProjectOutputGroup" Properties="TargetFramework=$(TargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="_ReferenceAssemblies" />
</MSBuild>
<!-- Check just to be safe. -->
<Error Condition="!Exists('%(_ReferenceAssemblies.Identity)')" Text="Reference assembly %(Identity) does not exist. Ensure it has been built before packaging." />
<!-- Add it to the package. -->
<ItemGroup>
<TfmSpecificPackageFile Include="@(_ReferenceAssemblies)" PackagePath="ref\$(TargetFramework)" />
</ItemGroup>
</Target>


<!-- Shared logic to publish multiple projects in the same
package. Pack doesn't support including project references
(/~https://github.com/NuGet/Home/issues/3891), so we work around
this by explicitly including the publish output in the
package. -->
<PropertyGroup>
<IncludePublishOutput Condition="'$(IncludePublishOutput)' == ''">false</IncludePublishOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(IncludePublishOutput)' == 'true'">
<!-- Don't include the build output. Instead, we want to include the TargetFramework-specific publish output. -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- Suppress NuGet warning for package which sets IncludeBuildOutput=false, see /~https://github.com/NuGet/Home/issues/8583 -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
<!-- Option to include Json files in the package. Default is to just include dlls. -->
<IncludeJsonFilesInPackage Condition="'$(IncludeJsonFilesInPackage)' == ''">false</IncludeJsonFilesInPackage>
<!-- Use a NuGet extension point to publish and set up the package files. -->
<!-- We can't use TargetsForTfmSpecificBuildOutput, because it doesn't run when IncludeBuildOutput is false. -->
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddPublishOutputToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<Target Name="_AddPublishOutputToPackage">
<PropertyGroup>
<PublishDir>$(BaseOutputPath)$(TargetFramework)</PublishDir>
</PropertyGroup>
<ItemGroup>
<ProjectsToPublish Include="$(MSBuildProjectFile)">
<AdditionalProperties>TargetFramework=$(TargetFramework);PublishDir=$(PublishDir)</AdditionalProperties>
</ProjectsToPublish>
</ItemGroup>
<!-- Clean the publish directory in case there are any left-over artifacts (publish does not work incrementally). -->
<ItemGroup>
<_FilesToDelete Remove="@(_FilesToDelete)" />
<_FilesToDelete Include="$(PublishDir)/*.dll" />
<_FilesToDelete Include="$(PublishDir)/*.json" />
</ItemGroup>
<Delete Files="@(_FilesToDelete)" />
<MSBuild Projects="@(ProjectsToPublish)" Targets="Publish" />
<ItemGroup>
<_PublishOutputInPackage Include="$(PublishDir)/*.dll" />
<_PublishOutputInPackage Include="$(PublishDir)/*.json" Condition="'$(IncludeJsonFilesInPackage)' == 'true'" />
</ItemGroup>
<!-- Sanity check. -->
<Error Condition="@(_PublishOutputInPackage->Count()) == 0" Text="No publish output included in package." />
<ItemGroup>
<TfmSpecificPackageFile Include="@(_PublishOutputInPackage)" PackagePath="$(BuildOutputTargetFolder)\$(TargetFramework)" />
</ItemGroup>
</Target>

</Project>
44 changes: 44 additions & 0 deletions src/tools/linker/PATENTS.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Microsoft Patent Promise for Mono

Microsoft Corporation and its affiliates (“Microsoft”) promise not to
assert any Applicable Patents against you for making, using, selling,
offering for sale, importing, or distributing Mono.

If you file, maintain, or voluntarily participate in any claim in a
lawsuit alleging direct or contributory patent infringement by Mono,
or inducement of patent infringement by Mono, then your rights under
this promise will automatically terminate.

This promise is not an assurance that (i) any Applicable Patents are
valid or enforceable or (ii) Mono does not infringe patents or other
intellectual property rights of any third party. No rights except
those expressly stated in this promise are granted, waived or received
by Microsoft, whether by implication, exhaustion, estoppel or
otherwise. This is a personal promise directly from Microsoft to you,
and you agree as a condition of benefitting from it that no Microsoft
rights are received from suppliers, distributors, or otherwise in
connection with this promise.

Definitions:

“Mono” means those portions of the software development technology, as
originally distributed by Xamarin, Inc. or the .NET Foundation under
the name “Mono,” that implement .NET Framework Functionality, provided
that such portions at a minimum implement all of the required parts of
the mandatory provisions of Standard ECMA-335 – Common Language
Infrastructure (CLI).

“.NET Framework Functionality” means any functionality in Microsoft’s
.NET Framework as described in Microsoft’s API documentation on
Microsoft’s MSDN website, including the functionality in
Windowsbase.dll, but excluding all other functionality in the Windows
Presentation Foundation component of .NET Framework.

“Applicable Patents” are those patent claims, currently owned by
Microsoft and acquired in the future, that are necessarily infringed
by Mono. For clarity, Applicable Patents do not include any patent
claims that are infringed (x) by any underlying or enabling technology
that may be used, combined, or distributed in connection with Mono
(such as hardware, operating systems, or applications that run on
Mono), (y) only as a consequence of modification of Mono, or (z) only
by the combination of Mono with third party code.
Loading