[PATCH] D89274: [WebAssembly] Use the new crt1-command.o if present.

Sam Clegg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 16:16:59 PST 2021


sbc100 added a comment.

In D89274#2555511 <https://reviews.llvm.org/D89274#2555511>, @sunfish wrote:

> It's to ensure that older LLVM works with newer WASI libc, and newer clang works with older WASI libc. New-style commands require [lld support]. We can assume that if clang is updated, lld has the requisite support.
>
> That said, I'm open to other ideas here.
>
> [lld support]: https://github.com/llvm/llvm-project/commit/6cd8511e5932e4a53b2bb7780f69489355fc7783

Certainly seems like its would be better if would find a way to keep the crt1.o name if possible.

I cant't remember now what the old and new crt1.o looks like... but maybe we can find way for new WASI libc to detect if the new linker is being used?  Perhaps using weak symbol references in crt1.o?

If that isn't possible then perhaps some kind of install script for wasi-libc that can install one or the other?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89274/new/

https://reviews.llvm.org/D89274



More information about the cfe-commits mailing list