From afaa3b02f79b16d175129e9c5cbf6660f7521a69 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 4 Dec 2025 01:16:37 +0100 Subject: [PATCH] [3.14] Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242) (GH-142246) Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242) (cherry picked from commit c5252045d3a7164f1829503d122091b5e469fda3) Co-authored-by: Brett Cannon --- Tools/wasm/wasi/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/wasm/wasi/__main__.py b/Tools/wasm/wasi/__main__.py index 628fbb10b63..62085dc0e64 100644 --- a/Tools/wasm/wasi/__main__.py +++ b/Tools/wasm/wasi/__main__.py @@ -269,7 +269,7 @@ def wasi_sdk_env(context): for env_var, binary_name in list(env.items()): env[env_var] = os.fsdecode(wasi_sdk_path / "bin" / binary_name) - if wasi_sdk_path != pathlib.Path("/opt/wasi-sdk"): + if not wasi_sdk_path.name.startswith("wasi-sdk"): for compiler in ["CC", "CPP", "CXX"]: env[compiler] += f" --sysroot={sysroot}"