@@ -2616,7 +2616,6 @@ class Bar {
2616
2616
@needs_dlfcn
2617
2617
def test_dlfcn_i64 (self ):
2618
2618
self .prep_dlfcn_lib ()
2619
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_foo' ])
2620
2619
lib_src = '''
2621
2620
int foo(int x) {
2622
2621
return (long long)x / (long long)1234;
@@ -2627,7 +2626,6 @@ def test_dlfcn_i64(self):
2627
2626
self .build_dlfcn_lib (lib_src , dirname , filename )
2628
2627
2629
2628
self .prep_dlfcn_main ()
2630
- self .clear_setting ('EXPORTED_FUNCTIONS' )
2631
2629
src = r'''
2632
2630
#include <stdio.h>
2633
2631
#include <stdlib.h>
@@ -2697,7 +2695,6 @@ class Bar {
2697
2695
@needs_dlfcn
2698
2696
def test_dlfcn_qsort (self ):
2699
2697
self .prep_dlfcn_lib ()
2700
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_get_cmp' ])
2701
2698
lib_src = '''
2702
2699
int lib_cmp(const void* left, const void* right) {
2703
2700
const int* a = (const int*) left;
@@ -2718,7 +2715,6 @@ def test_dlfcn_qsort(self):
2718
2715
self .build_dlfcn_lib (lib_src , dirname , filename )
2719
2716
2720
2717
self .prep_dlfcn_main ()
2721
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
2722
2718
src = '''
2723
2719
#include <stdio.h>
2724
2720
#include <stdlib.h>
@@ -2811,7 +2807,6 @@ def test_dlfcn_data_and_fptr(self):
2811
2807
'''
2812
2808
dirname = self .get_dir ()
2813
2809
filename = os .path .join (dirname , 'liblib.cpp' )
2814
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
2815
2810
self .build_dlfcn_lib (lib_src , dirname , filename )
2816
2811
2817
2812
self .prep_dlfcn_main ()
@@ -2868,7 +2863,6 @@ def test_dlfcn_data_and_fptr(self):
2868
2863
return 0;
2869
2864
}
2870
2865
'''
2871
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
2872
2866
self .do_run (src , '''\
2873
2867
In func: 13
2874
2868
First calling main_fptr from lib.
@@ -2892,7 +2886,6 @@ def test_dlfcn_varargs(self):
2892
2886
'''
2893
2887
dirname = self .get_dir ()
2894
2888
filename = os .path .join (dirname , 'liblib.cpp' )
2895
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_func' ])
2896
2889
self .build_dlfcn_lib (lib_src , dirname , filename )
2897
2890
2898
2891
self .prep_dlfcn_main ()
@@ -2925,7 +2918,6 @@ def test_dlfcn_varargs(self):
2925
2918
return 0;
2926
2919
}
2927
2920
'''
2928
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' ])
2929
2921
self .do_run (src , '100\n 200\n 13\n 42\n ' )
2930
2922
2931
2923
@needs_dlfcn
@@ -3041,7 +3033,6 @@ def test_dlfcn_unique_sig(self):
3041
3033
return 13;
3042
3034
}
3043
3035
'''
3044
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
3045
3036
dirname = self .get_dir ()
3046
3037
filename = os .path .join (dirname , 'liblib.c' )
3047
3038
self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3070,7 +3061,6 @@ def test_dlfcn_unique_sig(self):
3070
3061
return 0;
3071
3062
}
3072
3063
'''
3073
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
3074
3064
self .do_run (src , 'success' , force_c = True )
3075
3065
3076
3066
@needs_dlfcn
@@ -3084,7 +3074,6 @@ def test_dlfcn_info(self):
3084
3074
return 13;
3085
3075
}
3086
3076
'''
3087
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
3088
3077
dirname = self .get_dir ()
3089
3078
filename = os .path .join (dirname , 'liblib.c' )
3090
3079
self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3128,7 +3117,6 @@ def test_dlfcn_info(self):
3128
3117
return 0;
3129
3118
}
3130
3119
'''
3131
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
3132
3120
self .do_run (src , 'success' , force_c = True )
3133
3121
3134
3122
@needs_dlfcn
@@ -3149,7 +3137,6 @@ def test_dlfcn_stacks(self):
3149
3137
return strlen(bigstack);
3150
3138
}
3151
3139
'''
3152
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_myfunc' ])
3153
3140
dirname = self .get_dir ()
3154
3141
filename = os .path .join (dirname , 'liblib.c' )
3155
3142
self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3186,7 +3173,6 @@ def test_dlfcn_stacks(self):
3186
3173
return 0;
3187
3174
}
3188
3175
'''
3189
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_strcmp' ])
3190
3176
self .do_run (src , 'success' , force_c = True )
3191
3177
3192
3178
@needs_dlfcn
@@ -3223,7 +3209,6 @@ def test_dlfcn_funcs(self):
3223
3209
}
3224
3210
}
3225
3211
'''
3226
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_callvoid' , '_callint' , '_getvoid' , '_getint' ])
3227
3212
dirname = self .get_dir ()
3228
3213
self .build_dlfcn_lib (lib_src , dirname , os .path .join (dirname , 'liblib.c' ))
3229
3214
@@ -3275,7 +3260,6 @@ def test_dlfcn_funcs(self):
3275
3260
return 0;
3276
3261
}
3277
3262
'''
3278
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' ])
3279
3263
self .do_run (src , '''go
3280
3264
void_main.
3281
3265
int_main 201
@@ -3301,14 +3285,12 @@ def test_dlfcn_mallocs(self):
3301
3285
void *mallocproxy(int n) { return malloc(n); }
3302
3286
void freeproxy(void *p) { free(p); }
3303
3287
'''
3304
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_mallocproxy' , '_freeproxy' ])
3305
3288
dirname = self .get_dir ()
3306
3289
filename = os .path .join (dirname , 'liblib.c' )
3307
3290
self .build_dlfcn_lib (lib_src , dirname , filename )
3308
3291
3309
3292
self .prep_dlfcn_main ()
3310
3293
src = open (path_from_root ('tests' , 'dlmalloc_proxy.c' )).read ()
3311
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
3312
3294
self .do_run (src , '''*294,153*''' , force_c = True )
3313
3295
3314
3296
@needs_dlfcn
@@ -3325,7 +3307,6 @@ def test_dlfcn_longjmp(self):
3325
3307
printf("pre %d\n", i);
3326
3308
}
3327
3309
'''
3328
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_jumpy' ])
3329
3310
dirname = self .get_dir ()
3330
3311
filename = os .path .join (dirname , 'liblib.c' )
3331
3312
self .build_dlfcn_lib (lib_src , dirname , filename )
@@ -3360,7 +3341,6 @@ def test_dlfcn_longjmp(self):
3360
3341
return 0;
3361
3342
}
3362
3343
'''
3363
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
3364
3344
self .do_run (src , '''go!
3365
3345
pre 1
3366
3346
pre 2
@@ -3389,7 +3369,6 @@ def zzztest_dlfcn_exceptions(self): # TODO: make this work. need to forward temp
3389
3369
}
3390
3370
}
3391
3371
'''
3392
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_ok' , '_fail' ])
3393
3372
dirname = self .get_dir ()
3394
3373
filename = os .path .join (dirname , 'liblib.cpp' )
3395
3374
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
3434
3413
return 0;
3435
3414
}
3436
3415
'''
3437
- self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_malloc' , '_free' ])
3438
3416
self .do_run (src , '''go!
3439
3417
ok: 65
3440
3418
int 123
@@ -4088,7 +4066,7 @@ def test_dylink_global_var_jslib(self):
4088
4066
void call_side() {
4089
4067
printf("side: jslib_x is %d.\n", jslib_x);
4090
4068
}
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' ])
4092
4070
4093
4071
@needs_dlfcn
4094
4072
def test_dylink_many_postsets (self ):
0 commit comments