Skip to content

feat: support NativeAOT-LLVM backend#175

Merged
elringus merged 7 commits intomainfrom
feat/llvm
Mar 30, 2025
Merged

feat: support NativeAOT-LLVM backend#175
elringus merged 7 commits intomainfrom
feat/llvm

Conversation

@elringus
Copy link
Owner

@elringus elringus requested a review from Copilot March 30, 2025 22:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements support for the NativeAOT-LLVM backend by introducing a new LLVM property and adapting the assembly inspection and publishing behavior accordingly. Key changes include:

  • Adding a new required boolean property (LLVM) to toggle the NativeAOT-LLVM behavior.
  • Adjusting the file filtering in assembly inspection based on the LLVM flag.
  • Updating tests, samples, benchmark data, and documentation to reflect the new LLVM backend support.

Reviewed Changes

Copilot reviewed 11 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/cs/Bootsharp.Publish/Pack/BootsharpPack.cs Introduces the LLVM property and adapts file filtering.
src/cs/Bootsharp.Publish.Test/Pack/SolutionInspectionTest.cs Adds tests for behavior when LLVM is enabled.
src/cs/Bootsharp.Publish.Test/Pack/PackTest.cs Updates tests with the new LLVM property.
samples/trimming/cs/Program.cs Updates sample program to wrap log call in Main.
samples/trimming/README.md Updates benchmark table to add .NET 9 LLVM measurements.
samples/bench/readme.md Updates benchmark table columns and values.
samples/bench/dotnet-llvm/Program.cs Minor formatting removal of an extra blank line.
samples/bench/bench.mjs Updates label from ".NET" to ".NET AOT" for clarity.
docs/guide/llvm.md Adds comprehensive documentation for the LLVM backend.
docs/guide/build-config.md Documents the BootsharpLLVM property and its usage.
docs/.vitepress/config.ts Updates navigation to include the new LLVM guide.
Files not reviewed (7)
  • samples/bench/bootsharp/Boot.csproj: Language not supported
  • samples/trimming/cs/Trimming.csproj: Language not supported
  • src/cs/Bootsharp/Bootsharp.csproj: Language not supported
  • src/cs/Bootsharp/Build/Bootsharp.props: Language not supported
  • src/cs/Bootsharp/Build/Bootsharp.targets: Language not supported
  • src/cs/Directory.Build.props: Language not supported
  • src/js/test/cs/Test/Test.csproj: Language not supported

}

[Fact]
public void DoesntIgnoreAssembliesWhenLLVM ()
Copy link

Copilot AI Mar 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using the correct contraction "Doesn't" for better readability in the method name.

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

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

[nitpick] Consider using the correct contraction "Doesn't" for better readability in the method name.

Oh my dear AI overlord, I'd love to. But guess what happens if I use ' for an identifier in C#?

@codecov
Copy link

codecov bot commented Mar 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b0ec44d) to head (f41be82).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #175   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         1636      1640    +4     
  Branches       283       284    +1     
=========================================
+ Hits          1636      1640    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elringus elringus merged commit 6c51068 into main Mar 30, 2025
8 checks passed
@elringus elringus deleted the feat/llvm branch March 30, 2025 22:43
@hez2010
Copy link

hez2010 commented Apr 1, 2025

Note that you may still need <NativeDebugSymbols>false</NativeDebugSymbols>, otherwise debug symbols may be embedded into the final wasm binary which would be a major size regression.

@elringus
Copy link
Owner Author

elringus commented Apr 1, 2025

Note that you may still need <NativeDebugSymbols>false</NativeDebugSymbols>, otherwise debug symbols may be embedded into the final wasm binary which would be a major size regression.

Yeah, I have that when <BootsharpAggressiveTrimming> is enabled:

<NativeDebugSymbols>false</NativeDebugSymbols>

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore NativeAOT-LLVM target

2 participants