Hi,
I'm working on support for GNUStep/Objective-C.
When building an Objective-C library as a SIDE_MODULE, emscripten may create JavaScript declarations for exported symbols.
This is a problem for Objective-C, since it needs to export compiler-generated globals, such as .objc_ctor and the Objective-C class metadata.
Emscripten then tries to declare the exported symbols as JavaScript variables.
This is essentially a broader version of the issue that was fixed here: #25922, because the previous fixes still do not solve the problem for emscripten's dynamic linking.
I don't know enough about the dynamic linking internals to fix this myself, so I'd appreciate some guidance.
Perhaps it would be possible to either:
- "mangle" invalid JS identifiers, for example by treating $ as an escape character and replacing
. with $dot and $ with $$ or something like that
- Avoid declaring JavaScript variables and object-properties with the same name as the exported symbols
Best,
Hendrik
Hi,
I'm working on support for GNUStep/Objective-C.
When building an Objective-C library as a SIDE_MODULE, emscripten may create JavaScript declarations for exported symbols.
This is a problem for Objective-C, since it needs to export compiler-generated globals, such as
.objc_ctorand the Objective-C class metadata.Emscripten then tries to declare the exported symbols as JavaScript variables.
This is essentially a broader version of the issue that was fixed here: #25922, because the previous fixes still do not solve the problem for emscripten's dynamic linking.
I don't know enough about the dynamic linking internals to fix this myself, so I'd appreciate some guidance.
Perhaps it would be possible to either:
.with$dotand$with$$or something like thatBest,
Hendrik