Skip to content

Overriding -jsD directives causes an error #26576

@juj

Description

@juj

In native C compiler, one can override or repeat preprocessing directives on the command line, e.g.

$ emcc ... -DFOO=1 -DFOO=1

The -jsD setting was added to specify preprocessing directives in JS library code. However, attempting to override or repeat such directives currently causes an error:

$ emcc test/hello_world.c -jsDFOO=1 -jsDFOO=1
emcc: error: -jsDFOO=1: cannot change built-in settings values with a -jsD directive. Pass -sFOO=1 instead!

where the error is unrelated/confused with -sFOO settings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions