Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c525204

Browse files
authored
Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242)
1 parent 547d8da commit c525204

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/wasm/wasi/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def wasi_sdk_env(context):
271271
for env_var, binary_name in list(env.items()):
272272
env[env_var] = os.fsdecode(wasi_sdk_path / "bin" / binary_name)
273273

274-
if wasi_sdk_path != pathlib.Path("/opt/wasi-sdk"):
274+
if not wasi_sdk_path.name.startswith("wasi-sdk"):
275275
for compiler in ["CC", "CPP", "CXX"]:
276276
env[compiler] += f" --sysroot={sysroot}"
277277

0 commit comments

Comments
 (0)