[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. In D76452#2002981 , @danalbert wrote: > In D76452#2002917 , @MaskRay wrote: > > > In D76452#2002875 , @danalbert > > wrote: > > > > > In

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Dan Albert via Phabricator via cfe-commits
danalbert abandoned this revision. danalbert added a comment. In D76452#2002917 , @MaskRay wrote: > In D76452#2002875 , @danalbert wrote: > > > In D76452#2002856 , @int3

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D76452#2002875 , @danalbert wrote: > In D76452#2002856 , @int3 wrote: > > > Yes, I was referring to that question too :) I'm working on the new > > lld-macho implementation, under the

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. In D76452#2002856 , @int3 wrote: > Yes, I was referring to that question too :) I'm working on the new lld-macho > implementation, under the `DarwinNew` flavor. I'm not sure if anything > depends on the old `Darwin` flavor,

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. Yes, I was referring to that question too :) I'm working on the new lld-macho implementation, under the `DarwinNew` flavor. I'm not sure if anything depends on the old `Darwin` flavor, which is why we haven't removed it yet, though we plan to do that once we get the new

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. In D76452#2002620 , @int3 wrote: > I don't think I have enough context here to answer the question, but I'm > pretty sure that change wouldn't affect what I'm working on Sorry, wasn't referring to that question specifically,

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. I don't think I have enough context here to answer the question, but I'm pretty sure that change wouldn't affect what I'm working on Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/ https://reviews.llvm.org/D76452

[PATCH] D76452: Use LLD by default for Android.

2020-04-24 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. In D76452#2000812 , @nickdesaulniers wrote: > Can we use `-DCLANG_DEFAULT_LINKER=lld` to configure AOSP's distribution of > LLD, then require the use of `-fuse-ld= that is currently used>` when targeting OSX host tools? It'd

[PATCH] D76452: Use LLD by default for Android.

2020-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Can we use `-DCLANG_DEFAULT_LINKER=lld` to configure AOSP's distribution of LLD, then require the use of `-fuse-ld=` when targeting OSX host tools? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/

[PATCH] D76452: Use LLD by default for Android.

2020-04-16 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. Option 4 was (at least on the surface) super easy: https://reviews.llvm.org/D78328. lmk if you'd prefer that approach. I'm slightly less confident in it since it affects non-Android platforms as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76452: Use LLD by default for Android.

2020-04-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM. But hope @ruiu or @int3 can clarify that we can't get rid of the `__APPLE__` special case in: // lld/tools/lld/lld.cpp static Flavor parseProgname(StringRef progname) { #if __APPLE__ // Use Darwin driver for "ld" on

[PATCH] D76452: Use LLD by default for Android.

2020-04-16 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. @MaskRay Any other ideas, or should I submit this? Reviewing all our options: 1. Installing LLD as simply "ld" Rejected: Causes LLD to act in mach-o mode for Darwin 2. `-DCLANG_DEFAULT_LINKER=lld` Rejected: Our host Darwin toolchain still uses the system's linker,

[PATCH] D76452: Use LLD by default for Android.

2020-03-30 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. In D76452#1945084 , @srhines wrote: > In D76452#1945029 , @MaskRay wrote: > > > To cross build ELF object on macOS, another alternative is a wrapper named > > `ld` which invokes `lld

[PATCH] D76452: Use LLD by default for Android.

2020-03-26 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In D76452#1945029 , @MaskRay wrote: > In D76452#1944786 , @srhines wrote: > > > In D76452#1944733 , @MaskRay wrote: > > > > > Another approach will

[PATCH] D76452: Use LLD by default for Android.

2020-03-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D76452#1944786 , @srhines wrote: > In D76452#1944733 , @MaskRay wrote: > > > Another approach will be `-DCLANG_DEFAULT_LINKER=lld`. It provides a > > default value for `-fuse-ld=`. > >

[PATCH] D76452: Use LLD by default for Android.

2020-03-26 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In D76452#1944733 , @MaskRay wrote: > Another approach will be `-DCLANG_DEFAULT_LINKER=lld`. It provides a default > value for `-fuse-ld=`. How does that work for Darwin builds? Is lld fully supported for MachO at this point,

[PATCH] D76452: Use LLD by default for Android.

2020-03-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Another approach will be `-DCLANG_DEFAULT_LINKER=lld`. It provides a default value for `-fuse-ld=`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/ https://reviews.llvm.org/D76452

[PATCH] D76452: Use LLD by default for Android.

2020-03-26 Thread Dan Albert via Phabricator via cfe-commits
danalbert reclaimed this revision. danalbert added a comment. This revision is now accepted and ready to land. It seems I'd goofed something in my testing earlier (I think I still had `-fuse-ld=lld` force on in my build system). While Clang will find `ld` in the driver directory and prefer it,

[PATCH] D76452: Use LLD by default for Android.

2020-03-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for abandoning this patch. I am glad Android does not need customization on top of the generic Linux behavior. (This makes clangDriver clean.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/

[PATCH] D76452: Use LLD by default for Android.

2020-03-20 Thread Dan Albert via Phabricator via cfe-commits
danalbert abandoned this revision. danalbert added a comment. Looks like we don't actually need this. Can achieve the same effect by installing `ld.lld` to the same directory as Clang as `ld` and it'll be preferred over the other locations. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D76452: Use LLD by default for Android.

2020-03-20 Thread Stephen Hines via Phabricator via cfe-commits
srhines accepted this revision. srhines added a comment. This revision is now accepted and ready to land. Thanks, Dan, for setting this up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/ https://reviews.llvm.org/D76452

[PATCH] D76452: Use LLD by default for Android.

2020-03-19 Thread Dan Albert via Phabricator via cfe-commits
danalbert updated this revision to Diff 251498. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/ https://reviews.llvm.org/D76452 Files: clang/lib/Driver/ToolChains/Linux.h

[PATCH] D76452: Use LLD by default for Android.

2020-03-19 Thread Dan Albert via Phabricator via cfe-commits
danalbert created this revision. danalbert added a reviewer: srhines. danalbert added a project: clang. Herald added a subscriber: cryptoad. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76452 Files: clang/lib/Driver/ToolChains/Linux.h