Skip to content

Add WASM/Emscripten compiler flags to runtime_wrapper.bzl#18025

Merged
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
s09g:export-D95904580
Mar 10, 2026
Merged

Add WASM/Emscripten compiler flags to runtime_wrapper.bzl#18025
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
s09g:export-D95904580

Conversation

@s09g
Copy link
Contributor

@s09g s09g commented Mar 10, 2026

Summary:
Add pthread compiler flags (-pthread, -matomics, -mbulk-memory) for
Emscripten/WASM builds in ExecuTorch runtime wrapper.

These flags are required when linking into WASM binaries that use
-sUSE_PTHREADS=1. Without them, wasm-ld fails with:
"error: --shared-memory is disallowed by .o because it was not
compiled with 'atomics' or 'bulk-memory' features."

Reviewed By: GregoryComer

Differential Revision: D95904580

Summary:
Add pthread compiler flags (-pthread, -matomics, -mbulk-memory) for
Emscripten/WASM builds in ExecuTorch runtime wrapper.

These flags are required when linking into WASM binaries that use
-sUSE_PTHREADS=1. Without them, wasm-ld fails with:
  "error: --shared-memory is disallowed by <file>.o because it was not
   compiled with 'atomics' or 'bulk-memory' features."

Reviewed By: GregoryComer

Differential Revision: D95904580
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 10, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18025

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures

As of commit cf8d6ed with merge base 7824373 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Mar 10, 2026

@s09g has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95904580.

@s09g
Copy link
Contributor Author

s09g commented Mar 10, 2026

@pytorchbot label "release notes: build"

@pytorch-bot pytorch-bot bot added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Mar 10, 2026
@meta-codesync meta-codesync bot merged commit dda73d3 into pytorch:main Mar 10, 2026
160 of 178 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants