@@ -565,11 +565,7 @@ mergeInto(LibraryManager.library, {
565
565
tzset_impl__internal : true ,
566
566
tzset_impl__proxy : 'sync' ,
567
567
tzset_impl__sig : 'viii' ,
568
- tzset_impl__deps : [
569
- #if MINIMAL_RUNTIME
570
- '$allocateUTF8'
571
- #endif
572
- ] ,
568
+ tzset_impl__deps : [ '$allocateUTF8' ] ,
573
569
tzset_impl : function ( timezone , daylight , tzname ) {
574
570
var currentYear = new Date ( ) . getFullYear ( ) ;
575
571
var winter = new Date ( currentYear , 0 , 1 ) ;
@@ -654,10 +650,8 @@ mergeInto(LibraryManager.library, {
654
650
655
651
// Note: this is not used in STANDALONE_WASM mode, because it is more
656
652
// compact to do it in JS.
657
- strftime__deps : [ '_isLeapYear' , '_arraySum' , '_addDays' , '_MONTH_DAYS_REGULAR' , '_MONTH_DAYS_LEAP'
658
- #if MINIMAL_RUNTIME
659
- , '$intArrayFromString' , '$writeArrayToMemory'
660
- #endif
653
+ strftime__deps : [ '_isLeapYear' , '_arraySum' , '_addDays' , '_MONTH_DAYS_REGULAR' , '_MONTH_DAYS_LEAP' ,
654
+ '$intArrayFromString' , '$writeArrayToMemory'
661
655
] ,
662
656
strftime__sig : 'ppppp' ,
663
657
strftime : function ( s , maxsize , format , tm ) {
@@ -953,11 +947,8 @@ mergeInto(LibraryManager.library, {
953
947
return _strftime ( s , maxsize , format , tm ) ; // no locale support yet
954
948
} ,
955
949
956
- strptime__deps : [ '_isLeapYear' , '_arraySum' , '_addDays' , '_MONTH_DAYS_REGULAR' , '_MONTH_DAYS_LEAP' , '$jstoi_q'
957
- #if MINIMAL_RUNTIME
958
- , '$intArrayFromString'
959
- #endif
960
- ] ,
950
+ strptime__deps : [ '_isLeapYear' , '_arraySum' , '_addDays' , '_MONTH_DAYS_REGULAR' , '_MONTH_DAYS_LEAP' ,
951
+ '$jstoi_q' , '$intArrayFromString' ] ,
961
952
strptime__sig : 'pppp' ,
962
953
strptime : function ( buf , format , tm ) {
963
954
// char *strptime(const char *restrict buf, const char *restrict format, struct tm *restrict tm);
@@ -2078,11 +2069,7 @@ mergeInto(LibraryManager.library, {
2078
2069
list : [ ] ,
2079
2070
map : { }
2080
2071
} ,
2081
- setprotoent__deps : [ '$Protocols'
2082
- #if MINIMAL_RUNTIME
2083
- , '$writeAsciiToMemory'
2084
- #endif
2085
- ] ,
2072
+ setprotoent__deps : [ '$Protocols' , '$writeAsciiToMemory' ] ,
2086
2073
setprotoent : function ( stayopen ) {
2087
2074
// void setprotoent(int stayopen);
2088
2075
@@ -2771,13 +2758,7 @@ mergeInto(LibraryManager.library, {
2771
2758
2772
2759
// Look up the function name from our stack frame cache with our PC representation.
2773
2760
#if USE_OFFSET_CONVERTER
2774
- emscripten_pc_get_function__deps: [
2775
- '$UNWIND_CACHE' ,
2776
- 'free' ,
2777
- #if MINIMAL_RUNTIME
2778
- '$allocateUTF8' ,
2779
- #endif
2780
- ] ,
2761
+ emscripten_pc_get_function__deps: [ '$UNWIND_CACHE' , 'free' , '$allocateUTF8' ] ,
2781
2762
// Don't treat allocation of _emscripten_pc_get_function.ret as a leak
2782
2763
emscripten_pc_get_function__noleakcheck : true ,
2783
2764
emscripten_pc_get_function__sig : 'pp' ,
@@ -2838,11 +2819,7 @@ mergeInto(LibraryManager.library, {
2838
2819
} ,
2839
2820
2840
2821
// Look up the file name from our stack frame cache with our PC representation.
2841
- emscripten_pc_get_file__deps : [ '$convertPCtoSourceLocation' , 'free' ,
2842
- #if MINIMAL_RUNTIME
2843
- '$allocateUTF8' ,
2844
- #endif
2845
- ] ,
2822
+ emscripten_pc_get_file__deps : [ '$convertPCtoSourceLocation' , 'free' , '$allocateUTF8' ] ,
2846
2823
// Don't treat allocation of _emscripten_pc_get_file.ret as a leak
2847
2824
emscripten_pc_get_file__noleakcheck : true ,
2848
2825
emscripten_pc_get_file__sig : 'pp' ,
@@ -3651,3 +3628,28 @@ function autoAddDeps(object, name) {
3651
3628
}
3652
3629
}
3653
3630
}
3631
+
3632
+ #if LEGACY_RUNTIME
3633
+ // Library functions that were previously included as runtime functions are
3634
+ // automatically included when `LEGACY_RUNTIME` is set.
3635
+ DEFAULT_LIBRARY_FUNCS_TO_INCLUDE . push (
3636
+ '$addFunction' ,
3637
+ '$removeFunction' ,
3638
+ '$allocate' ,
3639
+ '$AsciiToString' ,
3640
+ '$stringToAscii' ,
3641
+ '$UTF16ToString' ,
3642
+ '$stringToUTF16' ,
3643
+ '$lengthBytesUTF16' ,
3644
+ '$UTF32ToString' ,
3645
+ '$stringToUTF32' ,
3646
+ '$lengthBytesUTF32' ,
3647
+ '$allocateUTF8' ,
3648
+ '$allocateUTF8OnStack' ,
3649
+ '$writeStringToMemory' ,
3650
+ '$writeArrayToMemory' ,
3651
+ '$writeAsciiToMemory' ,
3652
+ '$intArrayFromString' ,
3653
+ '$intArrayToString' ,
3654
+ ) ;
3655
+ #endif
0 commit comments