@@ -341,13 +341,13 @@ def get_ext(self):
341
341
"""
342
342
Return the appropriate file extension for this library.
343
343
"""
344
- return 'a' if shared .Settings .WASM_BACKEND and shared .Settings .WASM_OBJECT_FILES else 'bc'
344
+ return '. a' if shared .Settings .WASM_BACKEND and shared .Settings .WASM_OBJECT_FILES else '. bc'
345
345
346
346
def get_name (self ):
347
347
"""
348
348
Return the full name of the library file, including the file extension.
349
349
"""
350
- return self .get_base_name () + '.' + self .get_ext ()
350
+ return self .get_base_name () + self .get_ext ()
351
351
352
352
def get_symbols (self ):
353
353
"""
@@ -549,7 +549,7 @@ class NoBCLibrary(Library):
549
549
# libraries, only the object files, and by extension, their contained global constructors, that are actually needed
550
550
# will be linked in.
551
551
def get_ext (self ):
552
- return 'a'
552
+ return '. a'
553
553
554
554
555
555
class libcompiler_rt (Library ):
@@ -907,6 +907,34 @@ def get_default_variation(cls, **kwargs):
907
907
)
908
908
909
909
910
+ class libembind (CXXLibrary ):
911
+ name = 'libembind'
912
+ cflags = ['-std=c++11' ]
913
+ depends = ['libc++abi' ]
914
+ never_force = True
915
+
916
+ def get_files (self ):
917
+ return [shared .path_from_root ('system' , 'lib' , 'embind' , 'bind.cpp' )]
918
+
919
+
920
+ class libfetch (CXXLibrary , MTLibrary ):
921
+ name = 'libfetch'
922
+ depends = ['libc++abi' ]
923
+ never_force = True
924
+
925
+ def get_files (self ):
926
+ return [shared .path_from_root ('system' , 'lib' , 'fetch' , 'emscripten_fetch.cpp' )]
927
+
928
+
929
+ class libasmfs (CXXLibrary , MTLibrary ):
930
+ name = 'libasmfs'
931
+ depends = ['libc++abi' ]
932
+ never_force = True
933
+
934
+ def get_files (self ):
935
+ return [shared .path_from_root ('system' , 'lib' , 'fetch' , 'asmfs.cpp' )]
936
+
937
+
910
938
class libhtml5 (Library ):
911
939
name = 'libhtml5'
912
940
symbols = read_symbols (shared .path_from_root ('system' , 'lib' , 'html5.symbols' ))
@@ -1162,12 +1190,14 @@ class Dummy(object):
1162
1190
system_libs_map = Library .get_usable_variations ()
1163
1191
system_libs = sorted (system_libs_map .values (), key = lambda lib : lib .name )
1164
1192
1165
- # Setting this in the environment will avoid checking dependencies and make building big projects a little faster
1166
- # 1 means include everything; otherwise it can be the name of a lib (libc++, etc.)
1167
- # You can provide 1 to include everything, or a comma-separated list with the ones you want
1193
+ # Setting this in the environment will avoid checking dependencies and make
1194
+ # building big projects a little faster 1 means include everything; otherwise
1195
+ # it can be the name of a lib (libc++, etc.).
1196
+ # You can provide 1 to include everything, or a comma-separated list with the
1197
+ # ones you want
1168
1198
force = os .environ .get ('EMCC_FORCE_STDLIBS' )
1169
1199
if force == '1' :
1170
- force = ',' .join (key for key , lib in system_libs_map .items () if not lib .never_force )
1200
+ force = ',' .join (name for name , lib in system_libs_map .items () if not lib .never_force )
1171
1201
force_include = set ((force .split (',' ) if force else []) + forced )
1172
1202
if force_include :
1173
1203
logger .debug ('forcing stdlibs: ' + str (force_include ))
@@ -1186,7 +1216,7 @@ def add_library(lib):
1186
1216
1187
1217
logger .debug ('including %s (%s)' % (lib .name , lib .get_name ()))
1188
1218
1189
- need_whole_archive = lib .name in force_include and lib .get_ext () != 'bc '
1219
+ need_whole_archive = lib .name in force_include and lib .get_ext () == '.a '
1190
1220
libs_to_link .append ((lib .get_path (), need_whole_archive ))
1191
1221
1192
1222
# Recursively add dependencies
0 commit comments