File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
+ from pathlib import Path
3
4
from typing import TYPE_CHECKING
4
5
5
6
from emscripten_helpers import (
@@ -112,6 +113,14 @@ def configure(env: "SConsEnvironment"):
112
113
print_error ("Initial memory must be a valid integer" )
113
114
sys .exit (255 )
114
115
116
+ ## Add Emscripten to the included paths (for compile_commands.json completion)
117
+ emcc_path = Path (str (WhereIs ("emcc" )))
118
+ while emcc_path .is_symlink ():
119
+ # For some reason, mypy trips on `Path.readlink` not being defined, somehow.
120
+ emcc_path = emcc_path .readlink () # type: ignore[attr-defined]
121
+ emscripten_include_path = emcc_path .parent .joinpath ("cache" , "sysroot" , "include" )
122
+ env .Append (CPPPATH = [emscripten_include_path ])
123
+
115
124
## Build type
116
125
117
126
if env .debug_features :
You can’t perform that action at this time.
0 commit comments