Skip to content

Commit

Permalink
[wasm] Fix order of include paths, to have the obj dir first
Browse files Browse the repository at this point in the history
this regressed recently, and we started using `pinvoke-table.h`, and
`icall-table.h` from the runtime pack instead of from the obj dir.
  • Loading branch information
radical committed Apr 6, 2021
1 parent 350ee45 commit 8acbb24
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/mono/wasm/build/WasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -470,20 +470,17 @@
<Error Condition="'$(RunAOTCompilation)' == 'true' and @(_BitcodeFile->Count()) != @(_AOTAssemblies->Count())"
Text="Bug: Number of aot assemblies doesn't match the number of generated bitcode files. BitcodeFiles: @(_BitcodeFile->Count()) vs Assemblies: @(_AOTAssemblies->Count())" />

<ItemGroup>
<_EmccIncludePaths Include="$(_WasmIntermediateOutputPath.TrimEnd('\/'))" />
<_EmccIncludePaths Include="$(_WasmIncludeDir)mono-2.0" />
<_EmccIncludePaths Include="$(_WasmIncludeDir)wasm" />
</ItemGroup>

<PropertyGroup>
<EmccCFlags>$(EmccFlags) -DCORE_BINDINGS -DGEN_PINVOKE=1</EmccCFlags>
<EmccCFlags>$(EmccCFlags) @(_EmccIncludePaths -> '&quot;-I%(Identity)&quot;', ' ')</EmccCFlags>
<EmccCFlags Condition="'$(WasmNativeDebugSymbols)' == 'true'">$(EmccCFlags) -g</EmccCFlags>

<!--
For path c:\foo\bar\ quoting would make it "c:\foo\bar\"
.. which escapes the closing quote. So, instead make it
c:\foo\bar\ -> "c:\foo\bar\."
-->
<EmccCFlags Condition="$(_WasmIntermediateOutputPath.EndsWith('\')) ">$(EmccCFlags) "-I$(_WasmIntermediateOutputPath)."</EmccCFlags>
<EmccCFlags Condition="!$(_WasmIntermediateOutputPath.EndsWith('\'))">$(EmccCFlags) "-I$(_WasmIntermediateOutputPath)"</EmccCFlags>

<EmccCFlags>$(EmccCFlags) &quot;-I$(_WasmRuntimePackIncludeDir)mono-2.0&quot; &quot;-I$(_WasmRuntimePackIncludeDir)wasm&quot;</EmccCFlags>

<EmccLDFlags>$(EmccFlags) -s TOTAL_MEMORY=536870912</EmccLDFlags>
<_WasmOptCommand>$([MSBuild]::NormalizePath('$(EmSdkUpstreamBinPath)', 'wasm-opt$(_ExeExt)'))</_WasmOptCommand>
</PropertyGroup>
Expand Down

0 comments on commit 8acbb24

Please sign in to comment.