Skip to content

[mirror] fix(build): support Emscripten in the vendored ghc::filesystem copy - #4

Open
jdsika wants to merge 1 commit into
masterfrom
feature/ghc-filesystem-emscripten
Open

jdsika wants to merge 1 commit into
masterfrom
feature/ghc-filesystem-emscripten

Conversation

@jdsika

@jdsika jdsika commented Sep 14, 2026

Copy link
Copy Markdown

Mirror of RA-Consulting-GmbH#230 — tracking only. Do not merge.

Upstream PR: RA-Consulting-GmbH#230

Why this PR exists

Every fix this organisation depends on is written as a self-contained, single-commit
upstream contribution rather than a local patch, so that a fork is only needed for as
long as its contributions are unmerged.

That convention has one weakness: an upstream PR is easy to lose track of, because it
lives in someone else's repository and closes on someone else's schedule. This mirrored PR
is the counterweight — an open PR in our own fork for every contribution still pending
upstream, so the set of things we are carrying is visible from our own repository list.

It is closed when the upstream PR is merged or rejected, not before.

Contents

A single commit, identical in content to the upstream PR head:

feature/ghc-filesystem-emscripten -> master

Where it is used

Not consumed by the ASAM UML pipeline; tracked here so the contribution is not lost.

cpp/externalLibs/Filesystem/filesystem.hpp is a vendored copy of
gulrak/filesystem v1.3.2 (GHC_FILESYSTEM_VERSION 10302L), which predates
that library's Emscripten support. Emscripten defines __unix__ but not
__linux__, and none of the branches in the GHC_OS_DETECTED chain match it,
so the header stops at

  #error "Operating system currently not supported!"

and the library cannot be compiled to WebAssembly.

Map __EMSCRIPTEN__ onto the existing GHC_OS_LINUX branch: Emscripten's
POSIX layer provides everything that branch selects. The new #elif is
unreachable unless __EMSCRIPTEN__ is defined, so no existing platform
changes preprocessor state and no behaviour changes for any current target.

Upstream ghc::filesystem handles Emscripten natively as of v1.5.x (it
defines GHC_OS_WEB), so bumping the vendored copy would remove the need for
this edit. This commit is the minimal alternative to that bump.

Signed-off-by: Carlo van Driesten <carlo.van-driesten@vdl.digital>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant