Skip to content

Commit

Permalink
ci: Adjust for invalid png compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed May 12, 2023
1 parent d907da2 commit b7b157c
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 2 deletions.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side.bc/1.2/side.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side2.bc/1.3/side2.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side3.bc/1.3/side3.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side3.bc/1.4/side3.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side4.bc/1.3/side4.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side4.bc/2.0/side4.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side4.bc/3.1/side4.bc
Binary file not shown.
Binary file modified src/Uno.Wasm.StaticLinking.Shared/native/side4.bc/5.0/side4.bc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Uno.Wasm.StaticLinking.Shared/side_module/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ emcc main.cpp -s MAIN_MODULE=1 -o hello.html -s WASM=1 -s EXPORT_ALL=1 --pre-js

buildSideModule(){
mkdir -p `dirname $2`
emcc $1 -std=c++17 -s LEGALIZE_JS_FFI=0 -r -o $2 -s WASM=1 -s USE_LIBPNG=1 -fwasm-exceptions -DCUSTOM_VERSION="\"$3\"" $5 -DCUSTOM_FUNCTION_NAME="$4_getCustomVersion"
emcc $1 -std=c++17 -s LEGALIZE_JS_FFI=0 -r -o $2 -s WASM=1 -fwasm-exceptions -msimd128 -DCUSTOM_VERSION="\"$3\"" $5 -DCUSTOM_FUNCTION_NAME="$4_getCustomVersion"
}

buildSideModule "mysideModule.cpp" "../native/side.bc/1.2/side.bc" "1.2" "side" ""
Expand Down
12 changes: 11 additions & 1 deletion src/Uno.Wasm.StaticLinking.Shared/side_module/mysideModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ WASM_EXPORT int test_exception() {
}

WASM_EXPORT void test_png() {
png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
// Disabled for emsdk 3.1.34
//
// "emsdk/emsdk-3.1.34/emsdk/upstream/bin\wasm-ld.exe" @C:\Users\jerome.uno\AppData\Local\Temp\emscripten__pcr75u2.rsp.utf-8
// LLVM ERROR : Cannot select : 0x2700a022d48 : ch = catchret 0x2700844b498, BasicBlock : ch< 0x2700a020a30>, BasicBlock : ch< 0x2700a020928>, emsdk\emsdk - 3.1.34\emsdk\upstream\emscripten\cache\ports\libpng\libpng - 1.6.37\png.c:249 : 1
// In function : png_create_png_struct
// PLEASE submit a bug report to https ://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
// Stack dump :
// 0. Running pass 'Function Pass Manager' on module 'emsdk\\upstream\\emscripten\\cache\\sysroot\\lib\\wasm32-emscripten\\thinlto\\libpng.a(png.c.o at 31350)'.
// 1. Running pass 'WebAssembly Instruction Selection' on function '@png_create_png_struct'
// png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);

printf("After test_png\r\n");
}

0 comments on commit b7b157c

Please sign in to comment.