]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] Being more flexible in when not to explicitly set the sysroot when compiling...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 4 Dec 2025 00:16:37 +0000 (01:16 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Dec 2025 00:16:37 +0000 (00:16 +0000)
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 <brett@python.org>
Tools/wasm/wasi/__main__.py

index 628fbb10b630bcb4bc36d73ef2bc9bcea147da81..62085dc0e64030ad0e22b0993ec7c9ea08a8c6fb 100644 (file)
@@ -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}"