Ed Maste via llvm-dev
2016-Sep-12 20:19 UTC
[llvm-dev] lld: add build-time control for including ELF / COFF / Mach-O linkers?
We're in the process of importing lld into FreeBSD (along with our Clang 3.9 update project). For now I've removed all but the ELF linker[1]. We have no need for COFF and Mach-O, and we have a bespoke build system for all of our contrib code. I didn't bother adding build support for the source files for non-ELF linkers. Is this something that'd be reasonable / desirable to have extended and implemented upstream, in the CMake build and perhaps a bit of an #ifdef mess in tools/lld/lld.cpp::main()? [1] https://svnweb.freebsd.org/changeset/base/305070
Rui Ueyama via llvm-dev
2016-Sep-12 20:23 UTC
[llvm-dev] lld: add build-time control for including ELF / COFF / Mach-O linkers?
What's the motivation to not build COFF and Mach-O parts? If you don't need it, you could just leave it. Are you trying to reduce the executable size? On Mon, Sep 12, 2016 at 1:19 PM, Ed Maste via llvm-dev < llvm-dev at lists.llvm.org> wrote:> We're in the process of importing lld into FreeBSD (along with our > Clang 3.9 update project). For now I've removed all but the ELF > linker[1]. We have no need for COFF and Mach-O, and we have a bespoke > build system for all of our contrib code. I didn't bother adding build > support for the source files for non-ELF linkers. > > Is this something that'd be reasonable / desirable to have extended > and implemented upstream, in the CMake build and perhaps a bit of an > #ifdef mess in tools/lld/lld.cpp::main()? > > [1] https://svnweb.freebsd.org/changeset/base/305070 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160912/6647a5e3/attachment.html>
Ed Maste via llvm-dev
2016-Sep-12 20:33 UTC
[llvm-dev] lld: add build-time control for including ELF / COFF / Mach-O linkers?
On 12 September 2016 at 16:23, Rui Ueyama <ruiu at google.com> wrote:> What's the motivation to not build COFF and Mach-O parts? If you don't need > it, you could just leave it. Are you trying to reduce the executable size?It was just easier to remove coff::link() and mach_o::link() from lld.cpp than to add them to our own build infrastructure https://svnweb.freebsd.org/base/projects/clang390-import/usr.bin/clang/lld/Makefile?view=markup We get a slightly faster build and a slightly smaller binary, but I was motivated more by laziness than those factors. That is, it would have taken more work to include features that would be unused.
Possibly Parallel Threads
- lld: add build-time control for including ELF / COFF / Mach-O linkers?
- SA-12:04 commit on RELENG_8_1 incorrect?
- [LLVMdev] does new EH require newer linker?
- [LLVMdev] mesa-10.4.4: BROKEN TLS support in GLX with llvm-toolchain v3.6.0rc2
- [LLVMdev] [Mesa-dev] mesa-10.4.4: BROKEN TLS support in GLXwithllvm-toolchain v3.6.0rc2