Skip to content

Commit

Permalink
chore: Disable LLVM generation from .bc files to avoid wasm-ld valida…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
jeromelaban committed May 12, 2023
1 parent 4df57e0 commit 012b09d
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/Uno.Wasm.Packager/packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,15 +1161,6 @@ int Run (string[] args) {
if (enable_debug || !opts.EmccLinkOptimizations)
{
emcc_link_flags.Add("-O0 ");

if (!enable_threads)
{
// Disable thread optimizations because ofL
// wasm-ld: error: --shared-memory is disallowed by lto.tmp because it was not compiled with 'atomics' or 'bulk-memory' features.

emcc_link_flags.Add("-flto=thin");
emcc_flags += "-flto=thin ";
}
}
else
{
Expand Down Expand Up @@ -1325,7 +1316,9 @@ int Run (string[] args) {

if (is_netcore) {
emcc_flags += $"-DGEN_PINVOKE -I{src_prefix} ";
emcc_flags += $"-emit-llvm ";

// No need to emit LLVM, we're not using LTO options
// emcc_flags += $"-emit-llvm ";
}
if (!use_release_runtime)
// -s ASSERTIONS=2 is very slow
Expand Down Expand Up @@ -1392,7 +1385,7 @@ int Run (string[] args) {
}
else
{
ninja.WriteLine("emcc = $$env:PYTHONUTF8=1; $$EMCC_DEBUG=1; emcc ");
ninja.WriteLine("emcc = $$env:PYTHONUTF8=1; emcc ");
}

ninja.WriteLine ("wasm_opt = $emscripten_sdkdir/upstream/bin/wasm-opt");
Expand Down

0 comments on commit 012b09d

Please sign in to comment.