freebsd-skq/share/mk
jonathan bc1b92e799 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
..
atf.test.mk Remove unused atf.test.mk variables 2015-12-06 07:30:18 +00:00
auto.obj.mk Import latest auto.obj.mk 1.12 from contrib/bmake/mk. 2016-01-25 18:16:41 +00:00
bsd.arch.inc.mk
bsd.clang-analyze.mk Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
bsd.compiler.mk WITH_CCACHE_BUILD + WITH_META_MODE: Ignore ccache changes. 2016-06-03 19:25:45 +00:00
bsd.confs.mk These group names may be used as a cookie, so replace any non-fs-safe characters. 2016-03-09 22:45:00 +00:00
bsd.cpu.mk Revert r303911 "Remove extra -msoft-float flags settings." 2016-08-11 13:42:31 +00:00
bsd.crunchgen.mk DIRDEPS_BUILD: Include crunched object meta files for gendirdeps. 2016-09-01 23:52:20 +00:00
bsd.dep.mk When MAKEOBJDIRPREFIX points to a case-insensitive file system, the 2016-09-24 15:11:27 +00:00
bsd.doc.mk MFH 2016-03-02 16:14:46 +00:00
bsd.dtb.mk Add infrastructure to build dtb files from dts files. 2015-01-08 18:28:06 +00:00
bsd.endian.mk Start support for the RISC-V 64-bit architecture developed by UC Berkeley. 2015-12-11 22:55:23 +00:00
bsd.files.mk Allow FILESGROUPS to be specified more than once by pruning out duplicates 2016-04-30 21:32:29 +00:00
bsd.incs.mk MFH 2016-03-10 21:16:01 +00:00
bsd.info.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.init.mk Add a 'make print-dir' that simply traverses all directories and prints them. 2016-08-31 19:30:52 +00:00
bsd.kmod.mk WITH_META_MODE: Resolve SYSDIR to avoid changed build commands. 2016-05-31 23:08:43 +00:00
bsd.lib.mk Add LORDER, TSORT and TSORTFLAGS variables and replace the 2016-10-18 01:42:42 +00:00
bsd.libnames.mk Create libefivar library. This library aims to provide 2016-10-11 22:30:41 +00:00
bsd.links.mk MFH 2016-02-08 12:16:01 +00:00
bsd.man.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.mkopt.mk Appy := to dependent opts once value determined. 2015-06-22 19:01:09 +00:00
bsd.nls.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.obj.mk AUTO_OBJ: Support SRCS/DPSRCS that contain '/' and require a nested OBJDIR. 2016-08-30 22:48:05 +00:00
bsd.opts.mk Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
bsd.own.mk Update default KMODDIR in comment after r299393. 2016-05-26 18:28:10 +00:00
bsd.port.mk Avoid sub-shell for realpath(1) for bmake by using its built-in :tA. 2015-09-03 17:01:58 +00:00
bsd.port.options.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Avoid sub-shell for realpath(1) for bmake by using its built-in :tA. 2015-09-03 17:01:58 +00:00
bsd.prog.mk bsd.prog.mk: add "/usr/lib" to list of base system directories 2016-06-24 18:45:16 +00:00
bsd.progs.mk PROGS: Support INTERNALPROG.prog=yes to not install it. 2016-08-11 17:06:48 +00:00
bsd.README Document the ".pico" extension for object files. 2016-09-25 16:50:31 +00:00
bsd.snmpmod.mk WITH_META_MODE: Don't expect meta files for side-effect generated files. 2016-06-03 19:25:41 +00:00
bsd.stand.mk Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags. 2015-08-27 23:46:42 +00:00
bsd.subdir.mk Fix regression from r304644 which could cause .WAITs in SUBDIR to be ignored. 2016-09-09 18:49:45 +00:00
bsd.suffixes-posix.mk Extract suffix rules into bsd.suffixes[-posix].mk. 2016-10-12 00:42:46 +00:00
bsd.suffixes.mk Add make rules to build LLVM IR from C/C++ sources. 2016-10-20 15:14:21 +00:00
bsd.symver.mk
bsd.sys.mk Remove warning on struct-overflow on gcc 5.3.0 as zic(8) dies on it 2016-08-27 01:28:00 +00:00
bsd.test.mk Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
dirdeps.mk Update to latest dirdeps.mk 2016-09-09 01:21:35 +00:00
gendirdeps.mk Update dirdeps.mk et al 2016-04-18 20:56:21 +00:00
host-target.mk Import latest host-target.mk 1.11 from contrib/bmake/mk 2016-01-25 18:43:21 +00:00
install-new.mk DIRDEPS_BUILD: Install new Makefile.depend files atomically. 2015-12-04 03:17:07 +00:00
local.autodep.mk Revert r288966 as it is redundant and not right. 2015-12-03 22:39:42 +00:00
local.dirdeps.mk DIRDEPS_BUILD: Exclude secure/lib* libraries for host builds. 2016-05-04 03:13:48 +00:00
local.gendirdeps.mk DIRDEPS_BUILD: Exclude host tools for Makefile.depend.host as well. 2016-05-11 17:40:51 +00:00
local.init.mk Define .MAKE.MODE to normal to avoid the need for :U later. 2016-01-19 22:41:44 +00:00
local.meta.sys.mk Add a 'make print-dir' that simply traverses all directories and prints them. 2016-08-31 19:30:52 +00:00
local.sys.env.mk Move include of make.conf back to its old position. 2015-06-19 14:56:24 +00:00
local.sys.mk WITH_META_MODE: Enable printing of some of make's environment on error. 2016-06-14 16:20:25 +00:00
Makefile Extract suffix rules into bsd.suffixes[-posix].mk. 2016-10-12 00:42:46 +00:00
meta2deps.py Update meta2deps to fix crash when using -X with M2D_EXCLUDES. 2016-04-18 21:05:19 +00:00
meta2deps.sh MFH 2016-03-02 23:53:08 +00:00
meta.autodep.mk When MAKEOBJDIRPREFIX points to a case-insensitive file system, the 2016-09-24 15:11:27 +00:00
meta.stage.mk Import latest meta.stage.mk 1.45 (r301462) 2016-06-05 21:21:41 +00:00
meta.subdir.mk Import latest meta.subdir.mk 1.11 from contrib/bmake/mk 2016-01-25 18:34:15 +00:00
meta.sys.mk Avoid clobbering existing value of META_COOKIE_TOUCH 2016-09-13 22:17:25 +00:00
netbsd-tests.test.mk Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
plain.test.mk As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when 2014-11-04 01:57:31 +00:00
src.init.mk The 'buildenv' target can safely be ran with '+'. 2015-11-06 21:49:17 +00:00
src.libnames.mk Create libefivar library. This library aims to provide 2016-10-11 22:30:41 +00:00
src.opts.mk Add knobs to make GNU diff and GNU grep optional 2016-10-20 14:48:57 +00:00
src.sys.env.mk WITH_META_MODE: Don't let subdir traversals for 'make install' re-enable meta mode. 2016-08-25 23:55:56 +00:00
src.sys.mk Fix error when SRCCONF is empty. 2016-04-22 20:31:29 +00:00
stage-install.sh Add META_MODE support. 2015-06-13 19:20:56 +00:00
suite.test.mk Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
sys.dependfile.mk Merge bmake-20160307 2016-03-11 01:35:39 +00:00
sys.mk Add make rules to build LLVM IR from C/C++ sources. 2016-10-20 15:14:21 +00:00
tap.test.mk - Use LOCALBASE instead of KYUA_PREFIX for the --prefix to kyua(1) 2015-12-20 06:26:15 +00:00
version_gen.awk