Repository navigation
Fix the build for the Emscripten target - #2550
Merged
Merged
Conversation
tlTimer.cc fails with "#error Unsupported platform" because WebAssembly defines neither __linux__ nor __APPLE__, and WebAssembly has no /proc to read a resident set size from, so Timer::memory_size () returns 0 there.
pepijndevos
force-pushed
the
fix-emscripten-build
branch
from
November 12, 2026 14:09
26988ae to
5e11be0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tlTimer.ccdoes not compile for Emscripten: WebAssembly defines neither__linux__nor__APPLE__, soTimer::memory_size ()falls through to the trailing#error Unsupported platform. There is no/procon that target to read a resident set size from, so it returns 0.No test: a compile fix for a target the CI does not build. Verified with Emscripten 4.0.9, where the unpatched file fails with
error: Unsupported platformand the patched one compiles; a full Python module for Pyodide builds and passes its import tests with it.Drafted with an AI agent from a working build of KLayout for Pyodide.