Skip to content

Commit

Permalink
[dotnet] Ask the linker to not mark copied assemblies if we're in a '…
Browse files Browse the repository at this point in the history
…don't link' scenario. (#14011)

This speeds up builds significantly when the linker is disabled.

Test case: building tests/dotnet/MySimpleApp for macOS.

* Before: 37s
* After: 9s
* Difference: 26s (4x faster)

Test case: run the .NET tests

* Before: 2h55
* After: 1h43
* Difference: 1h12 (1.7x faster)

Contributes towards #10251.
Ref: dotnet/linker#2089
  • Loading branch information
rolfbjarne authored Feb 2, 2022
1 parent 16c3268 commit 68aaef9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@
XamarinRuntime=$(_XamarinRuntime)
</_CustomLinkerOptions>
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --custom-data "LinkerOptionsFile=$(_CustomLinkerOptionsFile)"</_ExtraTrimmerArgs>
<_ExtraTrimmerArgs Condition="'$(TrimMode)' == 'copy' And '$(MarkCopiedAssemblies)' != 'true'">$(_ExtraTrimmerArgs) --custom-data DisableMarkingOfCopyAssemblies=true</_ExtraTrimmerArgs>

<!-- Verbose output, so that we get something to stdout when something goes wrong -->
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --verbose</_ExtraTrimmerArgs>
Expand Down

4 comments on commit 68aaef9

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API Current PR diff

ℹ️ API Diff (from PR only) (please review changes)

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

Generator Diff (no change)

Packages generated

View packages

Test results

5 tests failed, 230 tests passed.

Failed tests

  • trimmode copy/Mac Catalyst [dotnet]/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    No test log file was produced)
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4) [dotnet]: Failed
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4): Failed
  • introspection/tvOS - simulator/Debug (tvOS 12.4) [dotnet]: Failed
  • introspection/tvOS - simulator/Debug (tvOS 12.4): Failed

Pipeline on Agent XAMBOT-1030.BigSur'
[dotnet] Ask the linker to not mark copied assemblies if we're in a 'don't link' scenario. (#14011)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests iOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-iOS64\TestSummary.md not found.

Pipeline on Agent
[dotnet] Ask the linker to not mark copied assemblies if we're in a 'don't link' scenario. (#14011)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests tvOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-tvos\TestSummary.md not found.

Pipeline on Agent
[dotnet] Ask the linker to not mark copied assemblies if we're in a 'don't link' scenario. (#14011)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ Tests failed on macOS Mac Catalina (10.15) ❌

Tests failed on Mac Catalina (10.15).

Failed tests are:

  • introspection

Pipeline on Agent
[dotnet] Ask the linker to not mark copied assemblies if we're in a 'don't link' scenario. (#14011)

Please sign in to comment.