We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be3ecae commit d3f722eCopy full SHA for d3f722e
platform/web/detect.py
@@ -1,5 +1,6 @@
1
import os
2
import sys
3
+from pathlib import Path
4
from typing import TYPE_CHECKING
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")
114
sys.exit(255)
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
+
124
## Build type
125
126
if env.debug_features:
0 commit comments