Page MenuHomeFreeBSD

Add rules to build LLVM IR binaries and libraries.
ClosedPublic

Authored by jonathan on Oct 31 2016, 1:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 3:51 PM
Unknown Object (File)
Tue, Apr 16, 3:50 AM
Unknown Object (File)
Tue, Apr 16, 1:35 AM
Unknown Object (File)
Tue, Apr 16, 1:34 AM
Unknown Object (File)
Tue, Apr 16, 1:34 AM
Unknown Object (File)
Tue, Apr 16, 1:34 AM
Unknown Object (File)
Sun, Apr 7, 2:42 PM
Unknown Object (File)
Sun, Apr 7, 3:49 AM
Subscribers
None

Details

Summary

This commmit allows us to run make libfoo.ll or make libfoo.bc
(vs libfoo.so) to get the IR version of a library or make foo.full.ll,
etc., to get the IR version of a binary.

As part of this work, we add an LLVM_LINK variable to sys.mk that can
can be specified/overridden using an external toolchain.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jonathan retitled this revision from to Add rules to build LLVM IR binaries and libraries..
jonathan updated this object.
jonathan edited the test plan for this revision. (Show Details)
jonathan added reviewers: bdrewery, brooks, emaste, rwatson.

Conceptually good.

On pedantic personal preference note, it seems redundant to refer to the change as a commit in the log rather than just saying what is happening and why.

share/mk/bsd.lib.mk
211 ↗(On Diff #21815)

bsd.lib.mk seems to be missing CLEANFILES additions.

share/mk/bsd.prog.mk
157 ↗(On Diff #21815)

The PROX_CXX vs !PROG_CXX cases don't appear to be different. Am I missing something?

191 ↗(On Diff #21815)

There seems to be some preexisting whitespace difference after the += there (unless phab is making things up as it sometimes does) which might be made consistent with other nearby lines while you're here.

bdrewery edited edge metadata.

Besides brooks' findings, it seems ok.

This revision is now accepted and ready to land.Oct 31 2016, 9:53 PM
jonathan edited edge metadata.
jonathan marked 3 inline comments as done.
  • Add {BC,LL}OBJS to bsd.lib.mk's CLEANFILES.
  • Remove redundant C++/non-C++ logic.
  • Improve whitespace consistency.
This revision now requires review to proceed.Nov 1 2016, 12:27 AM

Thanks for the comments: I think I've managed to address them.

share/mk/bsd.lib.mk
211 ↗(On Diff #21815)

Right you are...

share/mk/bsd.prog.mk
157 ↗(On Diff #21815)

Ah, no, you aren't missing anything: this distinction matters in another version of the patch that handles linking to ELF binaries (where we need to know if we include libc++ or not), but not in this patch. In fact, the other patch can probably be simplified too now that this is going in first...

191 ↗(On Diff #21815)

Can do.

brooks edited edge metadata.

Looks good to me

This revision is now accepted and ready to land.Nov 1 2016, 5:21 PM
This revision was automatically updated to reflect the committed changes.