yamt created this revision. Herald added subscribers: pmatos, asb, sunfish, jgravelle-google, sbc100, dschuff. Herald added a project: All. yamt requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, aheejin. Herald added a project: clang.
This allows -mexec-model=reactor -shared produces a library module with _initialize entrypoint, which is preferrable over __wasm_call_ctors. This partially reverts https://reviews.llvm.org/D153293 Discussion: https://github.com/dicej/component-linking-demo/issues/3 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156205 Files: clang/lib/Driver/ToolChains/WebAssembly.cpp Index: clang/lib/Driver/ToolChains/WebAssembly.cpp =================================================================== --- clang/lib/Driver/ToolChains/WebAssembly.cpp +++ clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -101,7 +101,7 @@ << CM << A->getOption().getName(); } } - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles, options::OPT_shared)) + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(Crt1))); if (Entry) { CmdArgs.push_back(Args.MakeArgString("--entry"));
Index: clang/lib/Driver/ToolChains/WebAssembly.cpp =================================================================== --- clang/lib/Driver/ToolChains/WebAssembly.cpp +++ clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -101,7 +101,7 @@ << CM << A->getOption().getName(); } } - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles, options::OPT_shared)) + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(Crt1))); if (Entry) { CmdArgs.push_back(Args.MakeArgString("--entry"));
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits