Skip to content

--sysroot= flag works now #13041

Closed
Closed
@dschuff

Description

@dschuff

... and that's probably not a good thing.

I found this trying to reproduce a partner's build, which used CMake's -DCMAKE_SYSROOT flag, which results in --sysroot= being passed to the compiler. This was a bug, because I don't think emscripten has ever supported that flag "correctly". However, before #12863 I believe we just ignored it (or I guess more correctly it was overridden by our use of -nostdsysteminc), but now it actually has an effect. In this case the correct thing to do was not to use a sysroot (since the sysroot they were using was for x86_64), but since the above NFC-intended change actually is user-visible, we should probably do one or more of the following:

  1. Actually make sure that -sysroot does what it should. Probably this is what we want eventually but based on my interpretatation of Run clang with --sysroot. NFC #12863 I don't think we are quite there yet.
  2. (assuming we don't do 1 yet) Explicitly ignore (or error out?) -sysroot and related flags that don't work.
  3. Add to the release notes if and when we make any user-visible changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions