[PATCH] D89274: [WebAssembly] Use the new crt1-command.o if present.
Dan Gohman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 11 14:44:53 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf9c05fc39145: [WebAssembly] Use the new crt1-command.o if present. (authored by sunfish).
Changed prior to commit:
https://reviews.llvm.org/D89274?vs=297698&id=323164#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89274/new/
https://reviews.llvm.org/D89274
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
@@ -77,6 +77,16 @@
const char *Crt1 = "crt1.o";
const char *Entry = NULL;
+
+ // If crt1-command.o exists, it supports new-style commands, so use it.
+ // Otherwise, use the old crt1.o. This is a temporary transition measure.
+ // Once WASI libc no longer needs to support LLVM versions which lack
+ // support for new-style command, it can make crt1.o the same as
+ // crt1-command.o. And once LLVM no longer needs to support WASI libc
+ // versions before that, it can switch to using crt1-command.o.
+ if (ToolChain.GetFilePath("crt1-command.o") != "crt1-command.o")
+ Crt1 = "crt1-command.o";
+
if (const Arg *A = Args.getLastArg(options::OPT_mexec_model_EQ)) {
StringRef CM = A->getValue();
if (CM == "command") {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89274.323164.patch
Type: text/x-patch
Size: 965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210211/00c21d47/attachment.bin>
More information about the cfe-commits
mailing list