Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add emscripten-wasm32 and wasi-wasm32 support #4813

Merged
merged 12 commits into from
Sep 22, 2023
2 changes: 1 addition & 1 deletion conda_build/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def get_shlib_ext(host_platform):
return ".dll"
elif host_platform in ["osx", "darwin"]:
return ".dylib"
elif host_platform.startswith("linux"):
elif host_platform.startswith("linux") or host_platform.endswith("-wasm32"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

host_platform only has the OS, so this condition will not be true.

return ".so"
elif host_platform == "noarch":
# noarch packages should not contain shared libraries, use the system
Expand Down
4 changes: 4 additions & 0 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def get_selectors(config: Config) -> dict[str, bool]:
linux=plat.startswith("linux-"),
linux32=bool(plat == "linux-32"),
linux64=bool(plat == "linux-64"),
emscripten=plat.startswith("emscripten-"),
wasi=plat.startswith("wasi-"),
jezdez marked this conversation as resolved.
Show resolved Hide resolved
unix=plat.startswith(("linux-", "osx-", "emscripten-")),
arm=plat.startswith("linux-arm"),
osx=plat.startswith("osx-"),
unix=plat.startswith(("linux-", "osx-")),
Expand All @@ -132,6 +135,7 @@ def get_selectors(config: Config) -> dict[str, bool]:
win64=bool(plat == "win-64"),
x86=plat.endswith(("-32", "-64")),
x86_64=plat.endswith("-64"),
wasm32=bool(plat.endswith("-wasm32")),
os=os,
environ=os.environ,
nomkl=bool(int(os.environ.get("FEATURE_NOMKL", False))),
Expand Down
2 changes: 2 additions & 0 deletions conda_build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def glob(pathname, recursive=True):
mmap_PROT_WRITE = 0 if on_win else mmap.PROT_WRITE

DEFAULT_SUBDIRS = {
jezdez marked this conversation as resolved.
Show resolved Hide resolved
"emscripten-wasm32",
"wasi-wasm32",
"linux-64",
"linux-32",
"linux-s390x",
Expand Down
19 changes: 19 additions & 0 deletions news/4813-wasm-platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* Handle `emscripten-wasm32` and `wasi-wasm32` platforms. (#4813)

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
Loading