@@ -9543,7 +9543,6 @@ def test(wasm, closure, opt):
9543
9543
test (['-s' , 'WASM=0' ], closure , opt )
9544
9544
test (['-s' , 'WASM=1' , '-s' , 'WASM_ASYNC_COMPILATION=0' ], closure , opt )
9545
9545
9546
- @no_wasm_backend ('tests asmjs, sizes sensitive to fastcomp' )
9547
9546
def test_minimal_runtime_code_size (self ):
9548
9547
smallest_code_size_args = ['-s' , 'MINIMAL_RUNTIME=2' ,
9549
9548
'-s' , 'AGGRESSIVE_VARIABLE_ELIMINATION=1' ,
@@ -9575,17 +9574,24 @@ def test_minimal_runtime_code_size(self):
9575
9574
path_from_root ('tests' , 'minimal_webgl' , 'webgl.c' ),
9576
9575
'--js-library' , path_from_root ('tests' , 'minimal_webgl' , 'library_js.js' ),
9577
9576
'-s' , 'RUNTIME_FUNCS_TO_IMPORT=[]' ,
9578
- '-s' , 'USES_DYNAMIC_ALLOC=2' , '-lGL ' ,
9577
+ '-s' , 'USES_DYNAMIC_ALLOC=2' , '-lwebgl.js ' ,
9579
9578
'-s' , 'MODULARIZE=1' ]
9580
9579
hello_webgl2_sources = hello_webgl_sources + ['-s' , 'MAX_WEBGL_VERSION=2' ]
9581
9580
9582
- test_cases = [
9583
- (asmjs + opts , hello_world_sources , {'a.html' : 1483 , 'a.js' : 289 , 'a.asm.js' : 113 , 'a.mem' : 6 }),
9584
- (opts , hello_world_sources , {'a.html' : 1440 , 'a.js' : 604 , 'a.wasm' : 86 }),
9585
- (asmjs + opts , hello_webgl_sources , {'a.html' : 1606 , 'a.js' : 4880 , 'a.asm.js' : 11139 , 'a.mem' : 321 }),
9586
- (opts , hello_webgl_sources , {'a.html' : 1557 , 'a.js' : 4837 , 'a.wasm' : 8841 }),
9587
- (opts , hello_webgl2_sources , {'a.html' : 1557 , 'a.js' : 5324 , 'a.wasm' : 8841 }) # Compare how WebGL2 sizes stack up with WebGL 1
9588
- ]
9581
+ if self .is_wasm_backend ():
9582
+ test_cases = [
9583
+ (opts , hello_world_sources , {'a.html' : 1445 , 'a.js' : 455 , 'a.wasm' : 176 }),
9584
+ (opts , hello_webgl_sources , {'a.html' : 1565 , 'a.js' : 4636 , 'a.wasm' : 11918 }),
9585
+ (opts , hello_webgl2_sources , {'a.html' : 1565 , 'a.js' : 5143 , 'a.wasm' : 11918 }) # Compare how WebGL2 sizes stack up with WebGL 1
9586
+ ]
9587
+ else :
9588
+ test_cases = [
9589
+ (asmjs + opts , hello_world_sources , {'a.html' : 1483 , 'a.js' : 289 , 'a.asm.js' : 113 , 'a.mem' : 6 }),
9590
+ (opts , hello_world_sources , {'a.html' : 1440 , 'a.js' : 604 , 'a.wasm' : 86 }),
9591
+ (asmjs + opts , hello_webgl_sources , {'a.html' : 1606 , 'a.js' : 4880 , 'a.asm.js' : 11139 , 'a.mem' : 321 }),
9592
+ (opts , hello_webgl_sources , {'a.html' : 1557 , 'a.js' : 4837 , 'a.wasm' : 8841 }),
9593
+ (opts , hello_webgl2_sources , {'a.html' : 1557 , 'a.js' : 5324 , 'a.wasm' : 8841 }) # Compare how WebGL2 sizes stack up with WebGL 1
9594
+ ]
9589
9595
9590
9596
success = True
9591
9597
0 commit comments