emscripten-core / emscripten-core/emscripten

USE_BOOST_HEADERS is incorrectly persistent

Open
#26,467 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

If you ever once issue a compilation command with -sUSE_BOOST_HEADERS, Boost somehow ends up on the include path of every subsequent compilation. This is unexpected and incorrect, as for example one might want to use a different version of Boost than what is included, leading to incompatibilities or confusing errors.

Reproducing minimal repo at: https://github.com/mmarczell-graphisoft/embug/commit/d846c9e4770e5cbc3645d62247753e9e2fca9c0e

Reproduction CI run at: https://github.com/mmarczell-graphisoft/embug/actions/runs/23202095356/job/67427039648#step:4:1

**Version of emscripten/emsdk:**
5.0.3

**Failing command line in full:**
```bash
em++ main.cpp # this fails, correctly
em++ -sUSE_BOOST_HEADERS main.cpp # this succeeds correctly
em++ main.cpp # this succeeds incorrectly
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.