@@ -2616,7 +2616,6 @@ class Bar {
26162616 @needs_dlfcn
26172617 def test_dlfcn_i64 (self ):
26182618 self .prep_dlfcn_lib ()
2619- self .set_setting ('EXPORTED_FUNCTIONS' , ['_foo' ])
26202619 lib_src = '''
26212620 int foo(int x) {
26222621 return (long long)x / (long long)1234;
@@ -2627,7 +2626,6 @@ def test_dlfcn_i64(self):
26272626 self .build_dlfcn_lib (lib_src , dirname , filename )
26282627
26292628 self .prep_dlfcn_main ()
2630- self .clear_setting ('EXPORTED_FUNCTIONS' )
26312629 src = r'''
26322630 #include <stdio.h>
26332631 #include <stdlib.h>
@@ -2697,7 +2695,6 @@ class Bar {
26972695 @needs_dlfcn
26982696 def test_dlfcn_qsort (self ):
26992697 self .prep_dlfcn_lib ()
2700- self .set_setting ('EXPORTED_FUNCTIONS' , ['_get_cmp' ])
27012698 lib_src = '''
27022699 int lib_cmp(const void* left, const void* right) {
27032700 const int* a = (const int*) left;
@@ -2718,7 +2715,6 @@ def test_dlfcn_qsort(self):
27182715 self .build_dlfcn_lib (lib_src , dirname , filename )
27192716
27202717 self .prep_dlfcn_main ()
2721- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
27222718 src = '''
27232719 #include <stdio.h>
27242720 #include <stdlib.h>
@@ -2811,7 +2807,6 @@ def test_dlfcn_data_and_fptr(self):
28112807 '''
28122808 dirname = self .get_dir ()
28132809 filename = os .path .join (dirname , 'liblib.cpp' )
2814- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
28152810 self .build_dlfcn_lib (lib_src , dirname , filename )
28162811
28172812 self .prep_dlfcn_main ()
@@ -2868,7 +2863,6 @@ def test_dlfcn_data_and_fptr(self):
28682863 return 0;
28692864 }
28702865 '''
2871- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
28722866 self .do_run (src , '''\
28732867 In func: 13
28742868First calling main_fptr from lib.
@@ -2892,7 +2886,6 @@ def test_dlfcn_varargs(self):
28922886 '''
28932887 dirname = self .get_dir ()
28942888 filename = os .path .join (dirname , 'liblib.cpp' )
2895- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
28962889 self .build_dlfcn_lib (lib_src , dirname , filename )
28972890
28982891 self .prep_dlfcn_main ()
@@ -2925,7 +2918,6 @@ def test_dlfcn_varargs(self):
29252918 return 0;
29262919 }
29272920 '''
2928- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
29292921 self .do_run (src , '100\n 200\n 13\n 42\n ' )
29302922
29312923 @needs_dlfcn
@@ -3041,7 +3033,6 @@ def test_dlfcn_unique_sig(self):
30413033 return 13;
30423034 }
30433035 '''
3044- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
30453036 dirname = self .get_dir ()
30463037 filename = os .path .join (dirname , 'liblib.c' )
30473038 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3070,7 +3061,6 @@ def test_dlfcn_unique_sig(self):
30703061 return 0;
30713062 }
30723063 '''
3073- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
30743064 self .do_run (src , 'success' , force_c = True )
30753065
30763066 @needs_dlfcn
@@ -3084,7 +3074,6 @@ def test_dlfcn_info(self):
30843074 return 13;
30853075 }
30863076 '''
3087- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
30883077 dirname = self .get_dir ()
30893078 filename = os .path .join (dirname , 'liblib.c' )
30903079 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3128,7 +3117,6 @@ def test_dlfcn_info(self):
31283117 return 0;
31293118 }
31303119 '''
3131- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
31323120 self .do_run (src , 'success' , force_c = True )
31333121
31343122 @needs_dlfcn
@@ -3149,7 +3137,6 @@ def test_dlfcn_stacks(self):
31493137 return strlen(bigstack);
31503138 }
31513139 '''
3152- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
31533140 dirname = self .get_dir ()
31543141 filename = os .path .join (dirname , 'liblib.c' )
31553142 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3186,7 +3173,6 @@ def test_dlfcn_stacks(self):
31863173 return 0;
31873174 }
31883175 '''
3189- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_strcmp' ])
31903176 self .do_run (src , 'success' , force_c = True )
31913177
31923178 @needs_dlfcn
@@ -3223,7 +3209,6 @@ def test_dlfcn_funcs(self):
32233209 }
32243210 }
32253211 '''
3226- self .set_setting ('EXPORTED_FUNCTIONS' , ['_callvoid' , '_callint' , '_getvoid' , '_getint' ])
32273212 dirname = self .get_dir ()
32283213 self .build_dlfcn_lib (lib_src , dirname , os .path .join (dirname , 'liblib.c' ))
32293214
@@ -3275,7 +3260,6 @@ def test_dlfcn_funcs(self):
32753260 return 0;
32763261 }
32773262 '''
3278- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
32793263 self .do_run (src , '''go
32803264void_main.
32813265int_main 201
@@ -3301,14 +3285,12 @@ def test_dlfcn_mallocs(self):
33013285 void *mallocproxy(int n) { return malloc(n); }
33023286 void freeproxy(void *p) { free(p); }
33033287 '''
3304- self .set_setting ('EXPORTED_FUNCTIONS' , ['_mallocproxy' , '_freeproxy' ])
33053288 dirname = self .get_dir ()
33063289 filename = os .path .join (dirname , 'liblib.c' )
33073290 self .build_dlfcn_lib (lib_src , dirname , filename )
33083291
33093292 self .prep_dlfcn_main ()
33103293 src = open (path_from_root ('tests' , 'dlmalloc_proxy.c' )).read ()
3311- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
33123294 self .do_run (src , '''*294,153*''' , force_c = True )
33133295
33143296 @needs_dlfcn
@@ -3325,7 +3307,6 @@ def test_dlfcn_longjmp(self):
33253307 printf("pre %d\n", i);
33263308 }
33273309 '''
3328- self .set_setting ('EXPORTED_FUNCTIONS' , ['_jumpy' ])
33293310 dirname = self .get_dir ()
33303311 filename = os .path .join (dirname , 'liblib.c' )
33313312 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3360,7 +3341,6 @@ def test_dlfcn_longjmp(self):
33603341 return 0;
33613342 }
33623343 '''
3363- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
33643344 self .do_run (src , '''go!
33653345pre 1
33663346pre 2
@@ -3389,7 +3369,6 @@ def zzztest_dlfcn_exceptions(self): # TODO: make this work. need to forward temp
33893369 }
33903370 }
33913371 '''
3392- self .set_setting ('EXPORTED_FUNCTIONS' , ['_ok' , '_fail' ])
33933372 dirname = self .get_dir ()
33943373 filename = os .path .join (dirname , 'liblib.cpp' )
33953374 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3434,7 +3413,6 @@ def zzztest_dlfcn_exceptions(self): # TODO: make this work. need to forward temp
34343413 return 0;
34353414 }
34363415 '''
3437- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
34383416 self .do_run (src , '''go!
34393417ok: 65
34403418int 123
@@ -4088,7 +4066,7 @@ def test_dylink_global_var_jslib(self):
40884066 void call_side() {
40894067 printf("side: jslib_x is %d.\n", jslib_x);
40904068 }
4091- ''' , expected = ['main: jslib_x is 148.\n side: jslib_x is 148.\n ' ], main_emcc_args = ['--js-library' , 'lib.js' , '-s' , 'EXPORTED_FUNCTIONS=["_main", "_jslib_x"]' ])
4069+ ''' , expected = ['main: jslib_x is 148.\n side: jslib_x is 148.\n ' ], main_emcc_args = ['--js-library' , 'lib.js' ])
40924070
40934071 @needs_dlfcn
40944072 def test_dylink_many_postsets (self ):
0 commit comments