Skip to content

Commit dd9230c

Browse files
authored
Dynamically calculate path to WASI config.site in Wasm32WasiCrossBuild factory (#601)
1 parent f7085ef commit dd9230c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

master/custom/factories.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,13 +880,20 @@ class Wasm32WasiCrossBuild(UnixCrossBuild):
880880
# debug builds exhaust the limited call stack on WASI
881881
"--without-pydebug",
882882
]
883-
compile_environ = {
884-
"CONFIG_SITE": "../../Tools/wasm/config.site-wasm32-wasi",
885-
}
886883
host = "wasm32-unknown-wasi"
887884
host_configure_cmd = ["../../Tools/wasm/wasi-env", "../../configure"]
888885

889886
def setup(self, parallel, branch, test_with_PTY=False, **kwargs):
887+
self.addStep(
888+
SetPropertyFromCommand(
889+
name="Find config.site-wasm32-wasi",
890+
description="Search Tools/wasm for config.site-wasm32-wasi",
891+
command="find Tools/wasm -name config.site-wasm32-wasi",
892+
property="config_site",
893+
warnOnFailure=True,
894+
)
895+
)
896+
self.host_configure_cmd.append(util.Interpolate("CONFIG_SITE=%(prop:config_site)s"))
890897
self.addStep(
891898
ShellCommand(
892899
name="Touch srcdir Modules/Setup.local",

0 commit comments

Comments
 (0)