@@ -273,7 +273,7 @@ def check_sanity(force=False):
273
273
return # config stored directly in EM_CONFIG => skip sanity checks
274
274
expected = generate_sanity ()
275
275
276
- sanity_file = Cache .get_path ('sanity.txt' , root = True )
276
+ sanity_file = Cache .get_path ('sanity.txt' )
277
277
if os .path .exists (sanity_file ):
278
278
sanity_data = open (sanity_file ).read ()
279
279
if sanity_data != expected :
@@ -420,9 +420,7 @@ def emsdk_ldflags(user_args):
420
420
return []
421
421
422
422
library_paths = [
423
- path_from_root ('system' , 'local' , 'lib' ),
424
- path_from_root ('system' , 'lib' ),
425
- Cache .dirname
423
+ Cache .get_lib_dir (absolute = True )
426
424
]
427
425
ldflags = ['-L' + l for l in library_paths ]
428
426
@@ -437,12 +435,12 @@ def emsdk_ldflags(user_args):
437
435
return ldflags
438
436
439
437
440
- def emsdk_cflags (user_args , cxx ):
438
+ def emsdk_cflags (user_args ):
441
439
# Disable system C and C++ include directories, and add our own (using
442
440
# -isystem so they are last, like system dirs, which allows projects to
443
441
# override them)
444
442
445
- c_opts = ['--sysroot=' + path_from_root ( 'system' )]
443
+ c_opts = ['--sysroot=' + Cache . get_sysroot_dir ( absolute = True )]
446
444
447
445
def array_contains_any_of (hay , needles ):
448
446
for n in needles :
@@ -477,24 +475,8 @@ def array_contains_any_of(hay, needles):
477
475
478
476
sysroot_include_paths = []
479
477
480
- if cxx :
481
- sysroot_include_paths += [
482
- os .path .join ('/include' , 'libcxx' ),
483
- os .path .join ('/lib' , 'libcxxabi' , 'include' ),
484
- ]
485
-
486
- # TODO: Merge the cache into the sysroot.
487
- c_opts += ['-Xclang' , '-isystem' + Cache .get_path ('include' )]
488
-
489
478
sysroot_include_paths += [
490
479
os .path .join ('/include' , 'compat' ),
491
- os .path .join ('/include' , 'libc' ),
492
- os .path .join ('/lib' , 'libc' , 'musl' , 'arch' , 'emscripten' ),
493
- os .path .join ('/local' , 'include' ),
494
- os .path .join ('/include' , 'SSE' ),
495
- os .path .join ('/include' , 'neon' ),
496
- os .path .join ('/lib' , 'compiler-rt' , 'include' ),
497
- os .path .join ('/lib' , 'libunwind' , 'include' ),
498
480
]
499
481
500
482
def include_directive (paths ):
@@ -511,7 +493,7 @@ def get_asmflags():
511
493
return ['-target' , get_llvm_target ()]
512
494
513
495
514
- def get_cflags (user_args , cxx ):
496
+ def get_cflags (user_args ):
515
497
# Set the LIBCPP ABI version to at least 2 so that we get nicely aligned string
516
498
# data and other nice fixes.
517
499
c_opts = [# '-fno-threadsafe-statics', # disabled due to issue 1289
@@ -538,7 +520,7 @@ def get_cflags(user_args, cxx):
538
520
if os .environ .get ('EMMAKEN_NO_SDK' ) or '-nostdinc' in user_args :
539
521
return c_opts
540
522
541
- return c_opts + emsdk_cflags (user_args , cxx )
523
+ return c_opts + emsdk_cflags (user_args )
542
524
543
525
544
526
# Settings. A global singleton. Not pretty, but nicer than passing |, settings| everywhere
@@ -747,11 +729,6 @@ def asmjs_mangle(name):
747
729
return name
748
730
749
731
750
- def reconfigure_cache ():
751
- global Cache
752
- Cache = cache .Cache (config .CACHE )
753
-
754
-
755
732
class JS (object ):
756
733
emscripten_license = '''\
757
734
/**
0 commit comments