Skip to content

Commit

Permalink
Display error if stubs not compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
yglukhov committed May 15, 2024
1 parent ebba3fd commit 1525605
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions wasmrt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -731,5 +731,13 @@ static:
discard staticExec("mkdir " & nimcache)
else:
discard staticExec("mkdir -p " & nimcache)
discard staticExec(compilerPath & " -c --target=wasm32-unknown-unknown-wasm -o " & nimcache & "/libm.a -x c -", input = "\n")
discard staticExec(compilerPath & " -c --target=wasm32-unknown-unknown-wasm -o " & nimcache & "/librt.a -x c -", input = "\n")
let (o1, r1) = gorgeEx(compilerPath & " -c --target=wasm32-unknown-unknown-wasm -o " & nimcache & "/libm.a -x c -", input = "\n")
if r1 != 0:
echo "Error compiling libm stub:"
echo o1
doAssert(false)
let (o2, r2) = gorgeEx(compilerPath & " -c --target=wasm32-unknown-unknown-wasm -o " & nimcache & "/librt.a -x c -", input = "\n")
if r2 != 0:
echo "Error compiling librt stub:"
echo o2
doAssert(false)

0 comments on commit 1525605

Please sign in to comment.