Skip to content

[mirror] fix(build): support Emscripten as a target platform - #5

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

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

Conversation

@jdsika

@jdsika jdsika commented Sep 14, 2026

Copy link
Copy Markdown

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

Upstream PR: RA-Consulting-GmbH#227

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/emscripten-portability -> master

Where it is used

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

Emscripten defines __unix__ but not __linux__, and is matched by none of
the existing platform branches. All three files below therefore fall
through to their #error fallback, so the library cannot be compiled to
WebAssembly at all:

  - cpp/openScenarioLib/src/common/ExportDefinitions.h
  - cpp/expressionsLib/inc/OscExprExportDefs.h
  - cpp/openScenarioLib/src/loader/FileResourceLocator.cpp

Add an __EMSCRIPTEN__ branch to the two symbol-visibility chains (no
visibility attribute is needed, as for __APPLE__), and accept
__EMSCRIPTEN__ in the POSIX branch of FileResourceLocator, which already
handles Linux and macOS identically and needs no change beyond the guard.

Verified that the preprocessor chains resolve under -D__EMSCRIPTEN__ and
that the existing Windows, Linux and macOS branches are reached exactly
as before.

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