hmelder wrote: Take `.objc_ctor` for example
https://github.com/llvm/llvm-project/blob/917e458b964418b17d969e3fa914846df4578004/clang/lib/CodeGen/CGObjCGNU.cpp#L1578-L1580 which is placed into comdat and explicitly marked as hidden here https://github.com/llvm/llvm-project/blob/917e458b964418b17d969e3fa914846df4578004/clang/lib/CodeGen/CGObjCGNU.cpp#L1598-L1599 When compiling a basic Objective-C application with emcc (`EM_LLVM_ROOT` pointing to my patched LLVM), I get the following error message: `emcc: error: invalid export name: "_.objc_ctor"` Which originates from `upstream/emscripten/tools/emscripten.py`: ```py for e in settings.EXPORTED_FUNCTIONS: if not js_manipulation.isidentifier(e): exit_with_error(f'invalid export name: "{e}"') ``` The hidden symbol is exported because the no-strip attributed was added implicitly, causing it to be exported in https://github.com/llvm/llvm-project/blob/2aa345054fa2975bd9d2e1ca03195e40c95058d7/llvm/lib/MC/WasmObjectWriter.cpp#L1795-L1800 https://github.com/llvm/llvm-project/pull/169043 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
