@@ -2632,7 +2632,6 @@ class Bar {
26322632 @needs_dlfcn
26332633 def test_dlfcn_i64 (self ):
26342634 self .prep_dlfcn_lib ()
2635- self .set_setting ('EXPORTED_FUNCTIONS' , ['_foo' ])
26362635 lib_src = '''
26372636 int foo(int x) {
26382637 return (long long)x / (long long)1234;
@@ -2643,7 +2642,6 @@ def test_dlfcn_i64(self):
26432642 self .build_dlfcn_lib (lib_src , dirname , filename )
26442643
26452644 self .prep_dlfcn_main ()
2646- self .clear_setting ('EXPORTED_FUNCTIONS' )
26472645 src = r'''
26482646 #include <stdio.h>
26492647 #include <stdlib.h>
@@ -2713,7 +2711,6 @@ class Bar {
27132711 @needs_dlfcn
27142712 def test_dlfcn_qsort (self ):
27152713 self .prep_dlfcn_lib ()
2716- self .set_setting ('EXPORTED_FUNCTIONS' , ['_get_cmp' ])
27172714 lib_src = '''
27182715 int lib_cmp(const void* left, const void* right) {
27192716 const int* a = (const int*) left;
@@ -2734,7 +2731,6 @@ def test_dlfcn_qsort(self):
27342731 self .build_dlfcn_lib (lib_src , dirname , filename )
27352732
27362733 self .prep_dlfcn_main ()
2737- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
27382734 src = '''
27392735 #include <stdio.h>
27402736 #include <stdlib.h>
@@ -2827,7 +2823,6 @@ def test_dlfcn_data_and_fptr(self):
28272823 '''
28282824 dirname = self .get_dir ()
28292825 filename = os .path .join (dirname , 'liblib.cpp' )
2830- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
28312826 self .build_dlfcn_lib (lib_src , dirname , filename )
28322827
28332828 self .prep_dlfcn_main ()
@@ -2884,7 +2879,6 @@ def test_dlfcn_data_and_fptr(self):
28842879 return 0;
28852880 }
28862881 '''
2887- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
28882882 self .do_run (src , '''\
28892883 In func: 13
28902884First calling main_fptr from lib.
@@ -2908,7 +2902,6 @@ def test_dlfcn_varargs(self):
29082902 '''
29092903 dirname = self .get_dir ()
29102904 filename = os .path .join (dirname , 'liblib.cpp' )
2911- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
29122905 self .build_dlfcn_lib (lib_src , dirname , filename )
29132906
29142907 self .prep_dlfcn_main ()
@@ -2941,7 +2934,6 @@ def test_dlfcn_varargs(self):
29412934 return 0;
29422935 }
29432936 '''
2944- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
29452937 self .do_run (src , '100\n 200\n 13\n 42\n ' )
29462938
29472939 @needs_dlfcn
@@ -3057,7 +3049,6 @@ def test_dlfcn_unique_sig(self):
30573049 return 13;
30583050 }
30593051 '''
3060- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
30613052 dirname = self .get_dir ()
30623053 filename = os .path .join (dirname , 'liblib.c' )
30633054 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3086,7 +3077,6 @@ def test_dlfcn_unique_sig(self):
30863077 return 0;
30873078 }
30883079 '''
3089- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
30903080 self .do_run (src , 'success' , force_c = True )
30913081
30923082 @needs_dlfcn
@@ -3100,7 +3090,6 @@ def test_dlfcn_info(self):
31003090 return 13;
31013091 }
31023092 '''
3103- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
31043093 dirname = self .get_dir ()
31053094 filename = os .path .join (dirname , 'liblib.c' )
31063095 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3144,7 +3133,6 @@ def test_dlfcn_info(self):
31443133 return 0;
31453134 }
31463135 '''
3147- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
31483136 self .do_run (src , 'success' , force_c = True )
31493137
31503138 @needs_dlfcn
@@ -3165,7 +3153,6 @@ def test_dlfcn_stacks(self):
31653153 return strlen(bigstack);
31663154 }
31673155 '''
3168- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
31693156 dirname = self .get_dir ()
31703157 filename = os .path .join (dirname , 'liblib.c' )
31713158 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3202,7 +3189,6 @@ def test_dlfcn_stacks(self):
32023189 return 0;
32033190 }
32043191 '''
3205- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_strcmp' ])
32063192 self .do_run (src , 'success' , force_c = True )
32073193
32083194 @needs_dlfcn
@@ -3239,7 +3225,6 @@ def test_dlfcn_funcs(self):
32393225 }
32403226 }
32413227 '''
3242- self .set_setting ('EXPORTED_FUNCTIONS' , ['_callvoid' , '_callint' , '_getvoid' , '_getint' ])
32433228 dirname = self .get_dir ()
32443229 self .build_dlfcn_lib (lib_src , dirname , os .path .join (dirname , 'liblib.c' ))
32453230
@@ -3291,7 +3276,6 @@ def test_dlfcn_funcs(self):
32913276 return 0;
32923277 }
32933278 '''
3294- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
32953279 self .do_run (src , '''go
32963280void_main.
32973281int_main 201
@@ -3317,14 +3301,12 @@ def test_dlfcn_mallocs(self):
33173301 void *mallocproxy(int n) { return malloc(n); }
33183302 void freeproxy(void *p) { free(p); }
33193303 '''
3320- self .set_setting ('EXPORTED_FUNCTIONS' , ['_mallocproxy' , '_freeproxy' ])
33213304 dirname = self .get_dir ()
33223305 filename = os .path .join (dirname , 'liblib.c' )
33233306 self .build_dlfcn_lib (lib_src , dirname , filename )
33243307
33253308 self .prep_dlfcn_main ()
33263309 src = open (path_from_root ('tests' , 'dlmalloc_proxy.c' )).read ()
3327- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
33283310 self .do_run (src , '''*294,153*''' , force_c = True )
33293311
33303312 @needs_dlfcn
@@ -3341,7 +3323,6 @@ def test_dlfcn_longjmp(self):
33413323 printf("pre %d\n", i);
33423324 }
33433325 '''
3344- self .set_setting ('EXPORTED_FUNCTIONS' , ['_jumpy' ])
33453326 dirname = self .get_dir ()
33463327 filename = os .path .join (dirname , 'liblib.c' )
33473328 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3376,7 +3357,6 @@ def test_dlfcn_longjmp(self):
33763357 return 0;
33773358 }
33783359 '''
3379- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
33803360 self .do_run (src , '''go!
33813361pre 1
33823362pre 2
@@ -3405,7 +3385,6 @@ def zzztest_dlfcn_exceptions(self): # TODO: make this work. need to forward temp
34053385 }
34063386 }
34073387 '''
3408- self .set_setting ('EXPORTED_FUNCTIONS' , ['_ok' , '_fail' ])
34093388 dirname = self .get_dir ()
34103389 filename = os .path .join (dirname , 'liblib.cpp' )
34113390 self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3450,7 +3429,6 @@ def zzztest_dlfcn_exceptions(self): # TODO: make this work. need to forward temp
34503429 return 0;
34513430 }
34523431 '''
3453- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
34543432 self .do_run (src , '''go!
34553433ok: 65
34563434int 123
@@ -4104,7 +4082,7 @@ def test_dylink_global_var_jslib(self):
41044082 void call_side() {
41054083 printf("side: jslib_x is %d.\n", jslib_x);
41064084 }
4107- ''' , 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"]' ])
4085+ ''' , expected = ['main: jslib_x is 148.\n side: jslib_x is 148.\n ' ], main_emcc_args = ['--js-library' , 'lib.js' ])
41084086
41094087 @needs_dlfcn
41104088 def test_dylink_many_postsets (self ):
0 commit comments