@@ -70,9 +70,8 @@ def _impl(ctx):
7070
7171 cc_target_os = "emscripten"
7272 emscripten_version = ctx .attr .emscripten_version
73- emscripten_root = "external/emscripten/" + emscripten_version
7473
75- builtin_sysroot = None
74+ builtin_sysroot = "external/emscripten/emscripten/cache/sysroot"
7675
7776 ################################################################
7877 # Tools
@@ -513,14 +512,7 @@ def _impl(ctx):
513512 # Language Features
514513 flag_set (
515514 actions = all_cpp_compile_actions ,
516- flags = [
517- "-std=gnu++17" ,
518- "-nostdinc" ,
519- "-Xclang" ,
520- "-nobuiltininc" ,
521- "-Xclang" ,
522- "-nostdsysteminc" ,
523- ],
515+ flags = ["-std=gnu++17" , "-nostdinc" , "-nostdinc++" ,],
524516 ),
525517
526518 # Emscripten-specific settings:
@@ -904,30 +896,10 @@ def _impl(ctx):
904896 actions = preprocessor_compile_actions +
905897 [ACTION_NAMES .cc_flags_make_variable ],
906898 flags = [
907- "-isystem" ,
908- emscripten_root + "/system/lib/libc/musl/arch/emscripten" ,
909- "-isystem" ,
910- emscripten_root + "/system/lib/libc/musl/arch/js" ,
911- "-isystem" ,
912- emscripten_root + "/system/local/include" ,
913- "-isystem" ,
914- emscripten_root + "/system/include/compat" ,
915- "-isystem" ,
916- emscripten_root + "/system/include" ,
917- "-isystem" ,
918- emscripten_root + "/system/include/libcxx" ,
919- "-isystem" ,
920- emscripten_root + "/system/lib/libcxxabi/include" ,
921- "-isystem" ,
922- emscripten_root + "/system/lib/compiler-rt/include" ,
923- "-isystem" ,
924- emscripten_root + "/system/include/libc" ,
925- "-isystem" ,
926- emscripten_root + "/system/include/gfx" ,
927- "-isystem" ,
928- emscripten_root + "/system/include/SDL" ,
929- "-isystem" ,
930- emscripten_root + "/lib/clang/12.0.0/include" ,
899+ "-iwithsysroot" + "/include/c++/v1" ,
900+ "-iwithsysroot" + "/include/compat" ,
901+ "-iwithsysroot" + "/include" ,
902+ "-isystem" , "external/emscripten/lib/clang/13.0.0/include" ,
931903 ],
932904 ),
933905 # Inputs and outputs
@@ -1070,18 +1042,10 @@ def _impl(ctx):
10701042 features .append (crosstool_default_flags_feature )
10711043
10721044 cxx_builtin_include_directories = [
1073- emscripten_version + "/system/lib/libc/musl/arch/emscripten" ,
1074- emscripten_version + "/system/lib/libc/musl/arch/js" ,
1075- emscripten_version + "/system/local/include" ,
1076- emscripten_version + "/system/include/compat" ,
1077- emscripten_version + "/system/include" ,
1078- emscripten_version + "/system/include/libcxx" ,
1079- emscripten_version + "/system/lib/compiler-rt/include" ,
1080- emscripten_version + "/system/lib/libcxxabi/include" ,
1081- emscripten_version + "/system/include/libc" ,
1082- emscripten_version + "/system/include/gfx" ,
1083- emscripten_version + "/system/include/SDL" ,
1084- emscripten_version + "/lib/clang/12.0.0/include" ,
1045+ "external/emscripten/emscripten/cache/sysroot/include/c++/v1" ,
1046+ "external/emscripten/emscripten/cache/sysroot/include/compat" ,
1047+ "external/emscripten/emscripten/cache/sysroot/include" ,
1048+ "external/emscripten/lib/clang/13.0.0/include" ,
10851049 ]
10861050
10871051 artifact_name_patterns = []
0 commit comments