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 11import os
22import sys
3+ from pathlib import Path
34from typing import TYPE_CHECKING
45
56from emscripten_helpers import (
@@ -115,6 +116,14 @@ def configure(env: "SConsEnvironment"):
115116 print_error ("Initial memory must be a valid integer" )
116117 sys .exit (255 )
117118
119+ # Add Emscripten to the included paths (for compile_commands.json completion)
120+ emcc_path = Path (str (WhereIs ("emcc" )))
121+ while emcc_path .is_symlink ():
122+ # For some reason, mypy trips on `Path.readlink` not being defined, somehow.
123+ emcc_path = emcc_path .readlink () # type: ignore[attr-defined]
124+ emscripten_include_path = emcc_path .parent .joinpath ("cache" , "sysroot" , "include" )
125+ env .Append (CPPPATH = [emscripten_include_path ])
126+
118127 ## Build type
119128
120129 if env .debug_features :
You can’t perform that action at this time.
0 commit comments