Module Name:    src
Committed By:   mrg
Date:           Wed Mar 20 22:51:38 UTC 2019

Modified Files:
        src/distrib/sets/lists/comp: md.amd64 md.i386 mi
        src/distrib/sets/lists/debug: mi
        src/external/bsd/llvm/bin: Makefile
        src/external/bsd/llvm/include: Makefile
        src/external/bsd/llvm/lib: Makefile
        src/share/mk: bsd.own.mk
        src/tools: Makefile

Log Message:
split MKLLVM into MKLLVM and MKLLVMCMDS, like MKGCC and MKGCCCMDS:

- only build clang or clang-tblgen if MKLLVMCMDS != "no"
- move HAVE_MESA_VER earlier so we can detect mesa 18 and enable
  MKLLVM on platforms that need it
- move the clang commands and headers into llvmcmds group
- only build the clang specific LLVM libraries if MKLLVMCMDS != "no"

much of this work came from maya@'s github commit
f90685c11d4460d3098fa35f48b58d1893e974e0, reworked for HAVE_MESA_VER
and llvmcmds vs MKCLANG.

build tested on several platforms and on amd64 and i386 with several
different build options (clang build, gcc build, gcc build with llvm
libs).


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.185 -r1.186 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.2263 -r1.2264 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.279 -r1.280 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/llvm/bin/Makefile
cvs rdiff -u -r1.46 -r1.47 src/external/bsd/llvm/include/Makefile
cvs rdiff -u -r1.47 -r1.48 src/external/bsd/llvm/lib/Makefile
cvs rdiff -u -r1.1112 -r1.1113 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.198 -r1.199 src/tools/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.269 src/distrib/sets/lists/comp/md.amd64:1.270
--- src/distrib/sets/lists/comp/md.amd64:1.269	Thu Feb 14 20:42:40 2019
+++ src/distrib/sets/lists/comp/md.amd64	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.269 2019/02/14 20:42:40 christos Exp $
+# $NetBSD: md.amd64,v 1.270 2019/03/20 22:51:37 mrg Exp $
 ./usr/include/amd64				comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -332,85 +332,85 @@
 ./usr/include/clang-5.0/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-5.0/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cpuid.h			comp-c-include		llvmcmds
+./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/immintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvmcmds
 ./usr/include/dev/nvmm				comp-c-include
 ./usr/include/dev/nvmm/nvmm.h			comp-c-include
 ./usr/include/dev/nvmm/nvmm_ioctl.h		comp-c-include

Index: src/distrib/sets/lists/comp/md.i386
diff -u src/distrib/sets/lists/comp/md.i386:1.185 src/distrib/sets/lists/comp/md.i386:1.186
--- src/distrib/sets/lists/comp/md.i386:1.185	Sat Feb  2 22:39:32 2019
+++ src/distrib/sets/lists/comp/md.i386	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.185 2019/02/02 22:39:32 mrg Exp $
+# $NetBSD: md.i386,v 1.186 2019/03/20 22:51:37 mrg Exp $
 ./usr/include/clang-3.4/__wmmintrin_aes.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/__wmmintrin_pclmul.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/ammintrin.h		comp-obsolete		obsolete
@@ -261,85 +261,85 @@
 ./usr/include/clang-5.0/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-5.0/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/cpuid.h			comp-c-include		llvmcmds
+./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/immintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvmcmds
+./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvmcmds
+./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvmcmds
 ./usr/include/emmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-4.1/emmintrin.h		comp-obsolete		obsolete
 ./usr/include/gcc-4.1/mm_malloc.h		comp-obsolete		obsolete

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2263 src/distrib/sets/lists/comp/mi:1.2264
--- src/distrib/sets/lists/comp/mi:1.2263	Tue Mar 12 23:51:40 2019
+++ src/distrib/sets/lists/comp/mi	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2263 2019/03/12 23:51:40 christos Exp $
+#	$NetBSD: mi,v 1.2264 2019/03/20 22:51:37 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp				comp-sys-root
@@ -13,10 +13,10 @@
 ./usr/bin/c89					comp-c-bin
 ./usr/bin/c99					comp-c-bin
 ./usr/bin/cc					comp-c-bin		gcccmds
-./usr/bin/clang					comp-c-bin		llvm
-./usr/bin/clang++				comp-c-bin		llvm
-./usr/bin/clang-cpp				comp-c-bin		llvm
-./usr/bin/clang-tblgen				comp-c-bin		llvm
+./usr/bin/clang					comp-c-bin		llvmcmds
+./usr/bin/clang++				comp-c-bin		llvmcmds
+./usr/bin/clang-cpp				comp-c-bin		llvmcmds
+./usr/bin/clang-tblgen				comp-c-bin		llvmcmds
 ./usr/bin/config				comp-util-bin
 ./usr/bin/crunchgen				comp-c-bin
 ./usr/bin/crunchide				comp-c-bin
@@ -364,7 +364,7 @@
 ./usr/include/clang-4.0/stdatomic.h		comp-obsolete		obsolete
 ./usr/include/clang-4.0/stdnoreturn.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/stdatomic.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/stdatomic.h		comp-c-include		llvm
+./usr/include/clang-7.0/stdatomic.h		comp-c-include		llvmcmds
 ./usr/include/complex.h				comp-c-include
 ./usr/include/cpio.h				comp-c-include
 ./usr/include/crypto/cryptodev.h		comp-c-include

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.279 src/distrib/sets/lists/debug/mi:1.280
--- src/distrib/sets/lists/debug/mi:1.279	Tue Mar 12 15:10:44 2019
+++ src/distrib/sets/lists/debug/mi	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.279 2019/03/12 15:10:44 christos Exp $
+# $NetBSD: mi,v 1.280 2019/03/20 22:51:37 mrg Exp $
 ./etc/mtree/set.debug                           comp-sys-root
 ./usr/lib					comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -487,8 +487,8 @@
 ./usr/libdata/debug/usr/bin/chpass.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/ci.debug		comp-rcs-debug		debug
 ./usr/libdata/debug/usr/bin/cksum.debug		comp-util-debug		debug
-./usr/libdata/debug/usr/bin/clang-tblgen.debug	comp-c-debug		llvm,debug
-./usr/libdata/debug/usr/bin/clang.debug		comp-c-debug		llvm,debug
+./usr/libdata/debug/usr/bin/clang-tblgen.debug	comp-c-debug		llvmcmds,debug
+./usr/libdata/debug/usr/bin/clang.debug		comp-c-debug		llvmcmds,debug
 ./usr/libdata/debug/usr/bin/cmp.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/co.debug		comp-rcs-debug		debug
 ./usr/libdata/debug/usr/bin/col.debug		comp-util-debug		debug

Index: src/external/bsd/llvm/bin/Makefile
diff -u src/external/bsd/llvm/bin/Makefile:1.17 src/external/bsd/llvm/bin/Makefile:1.18
--- src/external/bsd/llvm/bin/Makefile:1.17	Tue Aug  1 20:07:37 2017
+++ src/external/bsd/llvm/bin/Makefile	Wed Mar 20 22:51:38 2019
@@ -1,10 +1,14 @@
-#	$NetBSD: Makefile,v 1.17 2017/08/01 20:07:37 joerg Exp $
+#	$NetBSD: Makefile,v 1.18 2019/03/20 22:51:38 mrg Exp $
 
 .include <bsd.own.mk>
 
-SUBDIR=	clang \
-	clang-tblgen \
-	tblgen
+SUBDIR=	tblgen
+
+.if ${MKLLVMCMDS} != "no"
+SUBDIR+=	\
+	clang	\
+	clang-tblgen
+.endif
 
 .if ${MKLLD} != "no"
 SUBDIR+=	\

Index: src/external/bsd/llvm/include/Makefile
diff -u src/external/bsd/llvm/include/Makefile:1.46 src/external/bsd/llvm/include/Makefile:1.47
--- src/external/bsd/llvm/include/Makefile:1.46	Sun Mar  3 17:46:01 2019
+++ src/external/bsd/llvm/include/Makefile	Wed Mar 20 22:51:38 2019
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.46 2019/03/03 17:46:01 maya Exp $
+#	$NetBSD: Makefile,v 1.47 2019/03/20 22:51:38 mrg Exp $
 
 .include <bsd.init.mk>
 
 .PATH:	${CLANG_SRCDIR}/lib/Headers
 
-
+.if ${MKLLVMCMDS} != "no"
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 INCS=	adxintrin.h \
 	ammintrin.h \
@@ -101,22 +101,11 @@ INCS=	msa.h
 .endif
 INCS+=	stdatomic.h
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
-
-.PATH:	${LLVM_SRCDIR}/include/llvm/IR \
-	${CLANG_SRCDIR}/include/clang/AST \
+.PATH:	${CLANG_SRCDIR}/include/clang/AST \
 	${CLANG_SRCDIR}/include/clang/Basic \
 	${CLANG_SRCDIR}/include/clang/Driver \
 	${CLANG_SRCDIR}/include/clang/StaticAnalyzer/Checkers
 
-TABLEGEN_SRC=	Attributes.td Intrinsics.td Options.td
-
-TABLEGEN_OUTPUT.Attributes.td= \
-	llvm/IR/Attributes.inc|-gen-attrs
-
-TABLEGEN_OUTPUT.Intrinsics.td= \
-	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
-	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
-
 CLANG_TABLEGEN_SRC=	\
 	arm_fp16.td \
 	arm_neon.td \
@@ -206,10 +195,24 @@ CLANG_TABLEGEN_INCLUDES.Checkers.td=	\
 CLANG_TABLEGEN_OUTPUT.Checkers.td= \
 	clang/StaticAnalyzer/Checkers/Checkers.inc|-gen-clang-sa-checkers
 
+TABLEGEN_SRC+=	Options.td
+
 TABLEGEN_INCLUDES.Options.td=	-I${CLANG_SRCDIR}/include/clang/Driver
 TABLEGEN_OUTPUT.Options.td= \
 	clang/Driver/Options.inc|-gen-opt-parser-defs
 
+.endif
+
+.PATH:	${LLVM_SRCDIR}/include/llvm/IR
+TABLEGEN_SRC+=	Attributes.td Intrinsics.td #Options.td
+
+TABLEGEN_OUTPUT.Attributes.td= \
+	llvm/IR/Attributes.inc|-gen-attrs
+
+TABLEGEN_OUTPUT.Intrinsics.td= \
+	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
+	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
+
 .include "${.PARSEDIR}/../tablegen.mk"
 
 DPSRCS+=	clang/Basic/Version.inc llvm/Support/VCSRevision.h

Index: src/external/bsd/llvm/lib/Makefile
diff -u src/external/bsd/llvm/lib/Makefile:1.47 src/external/bsd/llvm/lib/Makefile:1.48
--- src/external/bsd/llvm/lib/Makefile:1.47	Tue Jul 17 18:55:27 2018
+++ src/external/bsd/llvm/lib/Makefile	Wed Mar 20 22:51:38 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2018/07/17 18:55:27 joerg Exp $
+# $NetBSD: Makefile,v 1.48 2019/03/20 22:51:38 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -121,6 +121,7 @@ SUBDIR+= \
 	libLLVMXRay
 .endif
 
+.if ${MKLLVMCMDS} != "no"
 SUBDIR+= \
 	libclangAnalysis \
 	libclangARCMigrate \
@@ -144,6 +145,7 @@ SUBDIR+= \
 	libclangStaticAnalyzerCore \
 	.WAIT \
 	libclangStaticAnalyzerFrontend
+.endif
 
 .if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
 SUBDIR+= \

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1112 src/share/mk/bsd.own.mk:1.1113
--- src/share/mk/bsd.own.mk:1.1112	Mon Mar 11 09:20:14 2019
+++ src/share/mk/bsd.own.mk	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1112 2019/03/11 09:20:14 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1113 2019/03/20 22:51:37 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1072,7 +1072,7 @@ _MKVARS.yes= \
 	MKGCC MKGDB MKGROFF \
 	MKHESIOD MKHTML \
 	MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
-	MKKERBEROS \
+	MKKERBEROS MKLLVMCMDS \
 	MKKMOD \
 	MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \
 	MKMAN MKMANDOC \
@@ -1233,6 +1233,16 @@ MKXORG_SERVER=yes
 .endif
 
 #
+# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
+#
+HAVE_MESA_VER?=	10
+.if ${HAVE_MESA_VER} == "10"
+EXTERNAL_MESALIB_DIR?=	MesaLib.old
+.else
+EXTERNAL_MESALIB_DIR?=	MesaLib
+.endif
+
+#
 # Force some options off if their dependencies are off.
 #
 
@@ -1295,6 +1305,23 @@ MKLIBCXX:=	yes
 .endif
 
 #
+# If we're building X11 (not the default) on x86, and we're using
+# Mesa >= 18, turn on LLVM libs, and maybe turn off building clang.
+#
+.if ${HAVE_MESA_VER} == "18"
+_NEEDS_LLVMLIB.x86_64=		yes
+_NEEDS_LLVMLIB.i386=		yes
+.endif
+
+.if ${MKX11} != "no" && ${_NEEDS_LLVMLIB.${MACHINE_ARCH}:Uno} == "yes"
+MKLLVM:=			yes
+.endif
+
+.if ${HAVE_LLVM:Uno} != "yes"
+MKLLVMCMDS:=			no
+.endif
+
+#
 # install(1) parameters.
 #
 COPY?=		-c
@@ -1466,14 +1493,6 @@ HAVE_XORG_SERVER_VER?=110
 HAVE_XORG_SERVER_VER?=120
 .endif
 
-# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
-HAVE_MESA_VER?=	10
-.if ${HAVE_MESA_VER} == "10"
-EXTERNAL_MESALIB_DIR?=	MesaLib.old
-.else
-EXTERNAL_MESALIB_DIR?=	MesaLib
-.endif
-
 .if ${HAVE_XORG_SERVER_VER} == "120"
 XORG_SERVER_SUBDIR?=xorg-server
 . if ${MACHINE} == "amd64" || ${MACHINE} == "i386"

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.198 src/tools/Makefile:1.199
--- src/tools/Makefile:1.198	Wed Jan  2 13:29:22 2019
+++ src/tools/Makefile	Wed Mar 20 22:51:37 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.198 2019/01/02 13:29:22 christos Exp $
+#	$NetBSD: Makefile,v 1.199 2019/03/20 22:51:37 mrg Exp $
 
 .include <bsd.own.mk>
 .include <bsd.endian.mk>
@@ -130,8 +130,10 @@ SUBDIR+= \
 .if ${MKLLVM} != "no" && !defined(EXTERNAL_TOOLCHAIN)
 SUBDIR+= \
 	.WAIT llvm-include .WAIT \
-	llvm-lib .WAIT \
-	llvm-clang
+	llvm-lib
+. if ${MKLLVMCMDS} != "no"
+SUBDIR+=	.WAIT llvm-clang
+. endif
 . if ${MKLLD} != "no"
 SUBDIR+=	llvm-lld
 . endif

Reply via email to