@@ -7870,70 +7870,70 @@ def test(filename, expectations, size_slack):
78707870
78717871 print ('test on hello world' )
78727872 test (path_from_root ('tests' , 'hello_world.cpp' ), [
7873- ([], 21 , ['assert ' ], ['waka' ], 46505 , 22 , 15 , 58 ), # noqa
7874- (['-O1' ], 16 , ['assert ' ], ['waka' ], 12630 , 14 , 13 , 30 ), # noqa
7875- (['-O2' ], 16 , ['assert ' ], ['waka' ], 12616 , 14 , 13 , 30 ), # noqa
7876- (['-O3' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa; in -O3, -Os and -Oz we metadce
7877- (['-Os' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa
7878- (['-Oz' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa
7873+ ([], 20 , ['abort ' ], ['waka' ], 46505 , 22 , 15 , 58 ), # noqa
7874+ (['-O1' ], 15 , ['abort ' ], ['waka' ], 12630 , 14 , 13 , 30 ), # noqa
7875+ (['-O2' ], 15 , ['abort ' ], ['waka' ], 12616 , 14 , 13 , 30 ), # noqa
7876+ (['-O3' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa; in -O3, -Os and -Oz we metadce
7877+ (['-Os' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa
7878+ (['-Oz' ], 6 , [], [], 2690 , 9 , 2 , 21 ), # noqa
78797879 # finally, check what happens when we export nothing. wasm should be almost empty
78807880 (['-Os' , '-s' , 'EXPORTED_FUNCTIONS=[]' ],
7881- 0 , [], [], 8 , 0 , 0 , 0 ), # noqa; totally empty!
7881+ 0 , [], [], 8 , 0 , 0 , 0 ), # noqa; totally empty!
78827882 # we don't metadce with linkable code! other modules may want stuff
78837883 (['-O3' , '-s' , 'MAIN_MODULE=1' ],
7884- 1557 , [], [], 226057 , 28 , 75 , None ), # noqa; don't compare the # of functions in a main module, which changes a lot
7884+ 1556 , [], [], 226057 , 28 , 75 , None ), # noqa; don't compare the # of functions in a main module, which changes a lot
78857885 ], size_slack ) # noqa
78867886
78877887 print ('test on a minimal pure computational thing' )
78887888 test ('minimal.c' , [
7889- ([], 21 , ['assert ' ], ['waka' ], 22712 , 22 , 14 , 27 ), # noqa
7890- (['-O1' ], 11 , ['assert ' ], ['waka' ], 10450 , 7 , 11 , 11 ), # noqa
7891- (['-O2' ], 11 , ['assert ' ], ['waka' ], 10440 , 7 , 11 , 11 ), # noqa
7889+ ([], 20 , ['abort ' ], ['waka' ], 22712 , 22 , 14 , 27 ), # noqa
7890+ (['-O1' ], 10 , ['abort ' ], ['waka' ], 10450 , 7 , 11 , 11 ), # noqa
7891+ (['-O2' ], 10 , ['abort ' ], ['waka' ], 10440 , 7 , 11 , 11 ), # noqa
78927892 # in -O3, -Os and -Oz we metadce, and they shrink it down to the minimal output we want
7893- (['-O3' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
7894- (['-Os' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
7895- (['-Oz' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
7893+ (['-O3' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
7894+ (['-Os' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
7895+ (['-Oz' ], 0 , [], [], 55 , 0 , 1 , 1 ), # noqa
78967896 ], size_slack )
78977897
78987898 print ('test on libc++: see effects of emulated function pointers' )
78997899 test (path_from_root ('tests' , 'hello_libcxx.cpp' ), [
7900- (['-O2' ], 35 , ['assert ' ], ['waka' ], 196709 , 28 , 39 , 659 ), # noqa
7900+ (['-O2' ], 34 , ['abort ' ], ['waka' ], 196709 , 28 , 39 , 659 ), # noqa
79017901 (['-O2' , '-s' , 'EMULATED_FUNCTION_POINTERS=1' ],
7902- 35 , ['assert ' ], ['waka' ], 196709 , 28 , 20 , 620 ), # noqa
7902+ 34 , ['abort ' ], ['waka' ], 196709 , 28 , 20 , 620 ), # noqa
79037903 ], size_slack ) # noqa
79047904 else :
79057905 # wasm-backend
79067906 size_slack = 0.5 # for now, don't look carefully at code size
79077907
79087908 print ('test on hello world' )
79097909 test (path_from_root ('tests' , 'hello_world.cpp' ), [
7910- ([], 17 , ['assert' ], ['waka' ], 33171 , 10 , 15 , 70 ), # noqa
7911- (['-O1' ], 15 , ['assert' ], ['waka' ], 14720 , 8 , 14 , 29 ), # noqa
7912- (['-O2' ], 15 , ['assert' ], ['waka' ], 14569 , 8 , 14 , 24 ), # noqa
7913- (['-O3' ], 5 , [], [], 3395 , 7 , 3 , 14 ), # noqa; in -O3, -Os and -Oz we metadce
7914- (['-Os' ], 5 , [], [], 3350 , 7 , 3 , 15 ), # noqa
7915- (['-Oz' ], 5 , [], [], 3309 , 7 , 2 , 14 ), # noqa
7910+ ([], 16 , [], ['waka' ], 33171 , 10 , 15 , 70 ), # noqa
7911+ (['-O1' ], 14 , [], ['waka' ], 14720 , 8 , 14 , 29 ), # noqa
7912+ (['-O2' ], 14 , [], ['waka' ], 14569 , 8 , 14 , 24 ), # noqa
7913+ (['-O3' ], 5 , [], [], 3395 , 7 , 3 , 14 ), # noqa; in -O3, -Os and -Oz we metadce
7914+ (['-Os' ], 5 , [], [], 3350 , 7 , 3 , 15 ), # noqa
7915+ (['-Oz' ], 5 , [], [], 3309 , 7 , 2 , 14 ), # noqa
79167916 # finally, check what happens when we export nothing. wasm should be almost empty
79177917 (['-Os' , '-s' , 'EXPORTED_FUNCTIONS=[]' ],
7918- 0 , [], [], 61 , 0 , 1 , 1 ), # noqa
7918+ 0 , [], [], 61 , 0 , 1 , 1 ), # noqa
79197919 ], size_slack ) # noqa
79207920
79217921 print ('test on a minimal pure computational thing' )
79227922 test ('minimal.c' , [
7923- ([], 17 , ['assert' ], ['waka' ], 14567 , 9 , 15 , 24 ), # noqa
7924- (['-O1' ], 10 , ['assert' ], ['waka' ], 11255 , 2 , 12 , 10 ), # noqa
7925- (['-O2' ], 10 , ['assert' ], ['waka' ], 11255 , 2 , 12 , 10 ), # noqa
7923+ ([], 16 , [], ['waka' ], 14567 , 9 , 15 , 24 ), # noqa
7924+ (['-O1' ], 9 , [], ['waka' ], 11255 , 2 , 12 , 10 ), # noqa
7925+ (['-O2' ], 9 , [], ['waka' ], 11255 , 2 , 12 , 10 ), # noqa
79267926 # in -O3, -Os and -Oz we metadce, and they shrink it down to the minimal output we want
7927- (['-O3' ], 0 , [], [], None , 0 , 1 , 1 ), # noqa FIXME see https://github.com/WebAssembly/binaryen/pull/1875
7928- (['-Os' ], 0 , [], [], None , 0 , 1 , 1 ), # noqa FIXME see https://github.com/WebAssembly/binaryen/pull/1875
7929- (['-Oz' ], 0 , [], [], None , 0 , 0 , 0 ), # noqa XXX wasm backend ignores EMSCRIPTEN_KEEPALIVE https://github.com/emscripten-core/emscripten/issues/6233
7927+ (['-O3' ], 0 , [], [], None , 0 , 1 , 1 ), # noqa FIXME see https://github.com/WebAssembly/binaryen/pull/1875
7928+ (['-Os' ], 0 , [], [], None , 0 , 1 , 1 ), # noqa FIXME see https://github.com/WebAssembly/binaryen/pull/1875
7929+ (['-Oz' ], 0 , [], [], None , 0 , 0 , 0 ), # noqa XXX wasm backend ignores EMSCRIPTEN_KEEPALIVE https://github.com/emscripten-core/emscripten/issues/6233
79307930 ], size_slack )
79317931
79327932 print ('test on libc++: see effects of emulated function pointers' )
79337933 test (path_from_root ('tests' , 'hello_libcxx.cpp' ), [
7934- (['-O2' ], 40 , ['assert' ], ['waka' ], 348370 , 27 , 224 , 728 ), # noqa
7934+ (['-O2' ], 39 , [], ['waka' ], 348370 , 27 , 224 , 728 ), # noqa
79357935 (['-O2' , '-s' , 'EMULATED_FUNCTION_POINTERS=1' ],
7936- 40 , ['assert' ], ['waka' ], 348249 , 27 , 224 , 728 ), # noqa
7936+ 39 , [], ['waka' ], 348249 , 27 , 224 , 728 ), # noqa
79377937 ], size_slack ) # noqa
79387938
79397939 # ensures runtime exports work, even with metadce
0 commit comments