Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use @(NativeFileReference) instead of @(NativeReference)
  • Loading branch information
radical committed Jul 16, 2021
commit cfcaa6f705de725b51ffc4d8258c104d82db3ab5
11 changes: 3 additions & 8 deletions src/mono/wasm/build/WasmApp.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

<PropertyGroup>
<WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true'">true</WasmBuildNative>
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeReference->Count()) > 0" >true</WasmBuildNative>
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative>
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(PublishTrimmed)' != 'true'" >false</WasmBuildNative>
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(Configuration)' == 'Release'" >true</WasmBuildNative>
<WasmBuildNative Condition="'$(WasmBuildNative)' == ''">false</WasmBuildNative>
Expand Down Expand Up @@ -191,10 +191,10 @@
<_WasmRuntimePackSrcFile ObjectFile="$(_WasmIntermediateOutputPath)%(FileName).o" />

<_DotnetJSSrcFile Include="$(_WasmRuntimePackSrcDir)\*.js" />
<_WasmNativeFileForLinking Include="@(NativeReference)" />
<_WasmNativeFileForLinking Include="@(NativeFileReference)" />
</ItemGroup>

<Error Text="Could not find NativeReference %(NativeReference.Identity)" Condition="'%(NativeReference.Identity)' != '' and !Exists(%(NativeReference.Identity))" />
<Error Text="Could not find NativeFileReference %(NativeFileReference.Identity)" Condition="'%(NativeFileReference.Identity)' != '' and !Exists(%(NativeFileReference.Identity))" />
</Target>

<Target Name="_GeneratePInvokeTable">
Expand Down Expand Up @@ -496,9 +496,4 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_
<EmccProperties ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="false" Output="true" />
</ParameterGroup>
</UsingTask>

<!-- @(NativeReference) is used by msbuild for native references too, and these targets get triggered by
them. But for wasm, we need different handling, so stub these out -->
<Target Name="ResolveNativeReferences" />
<Target Name="GenerateManifests" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="SkiaSharp" Version="2.80.3" />
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.80.3" />

<NativeReference Include="$(SkiaSharpStaticLibraryPath)\2.0.9\*.a" />
<NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\2.0.9\*.a" />
<WasmFilesToIncludeInFileSystem Include="$(MSBuildThisFileDirectory)mono.png" />
</ItemGroup>
</Project>