freebsd-dev/share
Jonathan Anderson c867306e60 Add make rules to build LLVM IR from C/C++ sources.
As a foundation for future work with LLVM's Intermediate Representation (IR),
add new suffix rules that can be used to build .llo (text) or .bco (bitcode)
files from C or C++ sources.  This compilation step uses the same CFLAGS, etc.,
as are used for building .o files, with the exception of optimization flags.
Many of the things we would like to do with IR (e.g., instrumentation) work
better with unoptimized code, so our approach is to build .c->.bco without
optimization and then apply the optimization in post-analysis,
post-instrumentation linking.

The overall result of these changes is:

* one can "make foo.llo" or "make foo.bco" wherever "make foo.o" was supported
* new make variables IR_CFLAGS and IR_CXXFLAGS are available to inspect the
  flags that are used by Clang to generate the IR

These new rules are added unconditionally to our non-POSIX suffix rule set,
since we cannot inspect COMPILER_TYPE in sys.mk.  Future changes that depend
on these rules (e.g., building IR versions of binaries from bsd.prog.mk)
should use COMPILER_TYPE to determine when we can expect IR rules to succeed.

Reviewed by:	emaste, imp
Approved by:	rwatson (mentor)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D4339
2016-10-20 15:14:21 +00:00
..
colldef Add the forgotten "svn mv" from r302329 2016-07-03 19:31:21 +00:00
ctypedef Posixify the locales name for variants 2016-07-03 18:21:11 +00:00
dict Add META_MODE support. 2015-06-13 19:20:56 +00:00
doc rtwn(4), urtwn(4): merge common code, add support for 11ac devices. 2016-10-17 20:38:24 +00:00
dtrace Remove redefinitions of some kernel types from mbuf.d. 2016-09-03 20:43:59 +00:00
examples libifconfig: style(9) fixes 2016-09-04 20:55:27 +00:00
i18n Fix building on read-only source trees. 2016-08-22 22:50:58 +00:00
keys META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
man Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
me Add META_MODE support. 2015-06-13 19:20:56 +00:00
misc FreeBSD 11.0 release date added. 2016-10-10 18:36:26 +00:00
mk Add make rules to build LLVM IR from C/C++ sources. 2016-10-20 15:14:21 +00:00
monetdef Posixify the locales name for variants 2016-07-03 18:21:11 +00:00
msgdef Posixify the locales name for variants 2016-07-03 18:21:11 +00:00
numericdef Posixify the locales name for variants 2016-07-03 18:21:11 +00:00
security META MODE: These need object directories to handle staging. 2015-11-26 01:14:27 +00:00
sendmail Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
skel Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
snmp Add META_MODE support. 2015-06-13 19:20:56 +00:00
syscons DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools. 2016-05-09 22:21:09 +00:00
tabset Add META_MODE support. 2015-06-13 19:20:56 +00:00
termcap Replace ln -s calls with INSTALL_SYMLINK 2015-12-04 03:17:14 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
timedef Suffix short month names with "월" and replace %b with %_m for date formats. 2016-09-07 23:35:38 +00:00
vt Remove uudecode make rule for vt fonts 2016-02-29 18:35:16 +00:00
zoneinfo Reimplement r301944 using the correct install(1) invocation, which again 2016-06-16 13:34:20 +00:00
Makefile Posixify the locales name for variants 2016-07-03 18:21:11 +00:00
Makefile.inc