Closed MaxGraey closed 2 years ago
Patch content:
@@ -258,12 +258,7 @@ endif() add_debug_compile_flag("-O0") add_debug_compile_flag("-g3") - if(EMSCRIPTEN) - # really focus on minimizing output size when compiling sources - add_nondebug_compile_flag("-Oz") - else() - add_nondebug_compile_flag("-O2") - endif() + add_nondebug_compile_flag("-O2") if(BYN_ENABLE_ASSERTIONS) # On non-Debug builds cmake automatically defines NDEBUG, so we # explicitly undefine it: @@ -375,6 +370,7 @@ target_link_libraries(binaryen_wasm optimized "--closure 1") target_link_libraries(binaryen_wasm optimized "--closure-args \"--language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6\"") target_link_libraries(binaryen_wasm optimized "-flto") + target_link_libraries(binaryen_wasm optimized "-msign-ext") # enable sign-extending proposal target_link_libraries(binaryen_wasm debug "--profiling") set_property(TARGET binaryen_wasm PROPERTY CXX_STANDARD ${CXX_STANDARD}) set_property(TARGET binaryen_wasm PROPERTY CXX_STANDARD_REQUIRED ON)
Gave this a try, and optimizing the bootstrapped AS compiler goes from ~59 seconds to ~15 (lol).
Patch content: