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

[NativeAOT-LLVM] Instead of disabling all workloads, disable mono toolchain #2565

Draft
wants to merge 1 commit into
base: feature/NativeAOT-LLVM
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/using-nativeaot/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ from any `PropertyGroup` tags if you have it. Instead, add
<PropertyGroup>
<PublishTrimmed>true</PublishTrimmed>
<SelfContained>true</SelfContained>
<MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload>
<UsingWasiRuntimeWorkload>false</UsingWasiRuntimeWorkload>
</PropertyGroup>
```

Note that the wasm-tools workload is identified as a dependency even though its not used, and this confuses the toolchain, hence `MSBuildEnableWorkloadResolver=false`.
Note that the wasm-tools workload is identified as a dependency even though its not used, and this confuses the toolchain, hence `UsingBrowserRuntimeWorkload=false` and `UsingWasiRuntimeWorkload=false`.

## Compile and publish your app

Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/building/coreclr/nativeaot.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ and the following two references to the project file itself:
<PackageReference Include="runtime.win-x64.Microsoft.DotNet.ILCompiler.LLVM" Version="8.0.0-dev" />
</ItemGroup>
```
You should now be able to publish the project for Wasm: `dotnet publish --self-contained -r browser-wasm /p:MSBuildEnableWorkloadResolver=false`. This produces `YourApp.html` and `YourApp.js` files under `bin\<Config>\<TFM>\browser-wasm\native`. The former can be opened in the browser, the latter - run via NodeJS.
You should now be able to publish the project for Wasm: `dotnet publish --self-contained -r browser-wasm /p:UsingBrowserRuntimeWorkload=false`. This produces `YourApp.html` and `YourApp.js` files under `bin\<Config>\<TFM>\browser-wasm\native`. The former can be opened in the browser, the latter - run via NodeJS.

## Building

Expand Down
3 changes: 2 additions & 1 deletion samples/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

<PublishTrimmed>true</PublishTrimmed>
<SelfContained>true</SelfContained>
<MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload>
<UsingWasiRuntimeWorkload>false</UsingWasiRuntimeWorkload>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion samples/NativeLibrary/NativeLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<PublishTrimmed>true</PublishTrimmed>
<SelfContained>true</SelfContained>
<MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload>
<UsingWasiRuntimeWorkload>false</UsingWasiRuntimeWorkload>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">
<CLRTestMSBuildArgs>/p:MSBuildEnableWorkloadResolver=false /p:Configuration=$(Configuration)</CLRTestMSBuildArgs>
<CLRTestMSBuildArgs>/p:UsingBrowserRuntimeWorkload=false /p:UsingWasiRuntimeWorkload=false /p:Configuration=$(Configuration)</CLRTestMSBuildArgs>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestsCommonProject)' != 'true'">
Expand Down
Loading