@@ -846,8 +846,13 @@ try:
846
846
# libcxx
847
847
def create_libcxx ():
848
848
if DEBUG : print >> sys .stderr , 'emcc: building libcxx for cache'
849
- shared .Building .build_library ('libcxx' , shared .EMSCRIPTEN_TEMP_DIR , shared .EMSCRIPTEN_TEMP_DIR , ['libcxx.bc' ], configure = None , copy_project = True , source_dir = shared .path_from_root ('system' , 'lib' , 'libcxx' ))
850
- return os .path .join (shared .EMSCRIPTEN_TEMP_DIR , 'libcxx' , 'libcxx.bc' )
849
+ os = []
850
+ for src in ['algorithm.cpp' , 'condition_variable.cpp' , 'future.cpp' , 'iostream.cpp' , 'memory.cpp' , 'random.cpp' , 'stdexcept.cpp' , 'system_error.cpp' , 'utility.cpp' , 'bind.cpp' , 'debug.cpp' , 'hash.cpp' , 'mutex.cpp' , 'string.cpp' , 'thread.cpp' , 'valarray.cpp' , 'chrono.cpp' , 'exception.cpp' , 'ios.cpp' , 'locale.cpp' , 'regex.cpp' , 'strstream.cpp' , 'typeinfo.cpp' ]:
851
+ o = in_temp (src + '.o' )
852
+ execute (shared .ENV_PREFIX + ['python' , shared .EMXX , shared .path_from_root ('system' , 'lib' , 'libcxx' , src ), '-o' , o ], stdout = stdout , stderr = stderr )
853
+ os .append (o )
854
+ shared .Building .link (os , in_temp ('libcxx.bc' ))
855
+ return in_temp ('libcxx.bc' )
851
856
def fix_libcxx ():
852
857
assert shared .Settings .QUANTUM_SIZE == 4 , 'We do not support libc++ with QUANTUM_SIZE == 1'
853
858
# libcxx might need corrections, so turn them all on. TODO: check which are actually needed
@@ -860,8 +865,13 @@ try:
860
865
# libcxxabi - just for dynamic_cast for now
861
866
def create_libcxxabi ():
862
867
if DEBUG : print >> sys .stderr , 'emcc: building libcxxabi for cache'
863
- shared .Building .build_library ('libcxxabi' , shared .EMSCRIPTEN_TEMP_DIR , shared .EMSCRIPTEN_TEMP_DIR , ['libcxxabi.bc' ], configure = None , copy_project = True , source_dir = shared .path_from_root ('system' , 'lib' , 'libcxxabi' ))
864
- return os .path .join (shared .EMSCRIPTEN_TEMP_DIR , 'libcxxabi' , 'libcxxabi.bc' )
868
+ os = []
869
+ for src in ['private_typeinfo.cpp' ]:
870
+ o = in_temp (src + '.o' )
871
+ execute (shared .ENV_PREFIX + ['python' , shared .EMXX , shared .path_from_root ('system' , 'lib' , 'libcxxabi' , 'src' , src ), '-o' , o ], stdout = stdout , stderr = stderr )
872
+ os .append (o )
873
+ shared .Building .link (os , in_temp ('libcxxabi.bc' ))
874
+ return in_temp ('libcxxabi.bc' )
865
875
def fix_libcxxabi ():
866
876
assert shared .Settings .QUANTUM_SIZE == 4 , 'We do not support libc++abi with QUANTUM_SIZE == 1'
867
877
#print >> sys.stderr, 'emcc: info: using libcxxabi, this may need CORRECT_* options'
0 commit comments