Page MenuHomeFreeBSD

D25427.diff
No OneTemporary

D25427.diff

Index: head/Makefile.inc1
===================================================================
--- head/Makefile.inc1
+++ head/Makefile.inc1
@@ -676,7 +676,7 @@
MK_HTML=no NO_LINT=yes MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
- MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+ MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \
MK_INCLUDES=yes
@@ -697,7 +697,7 @@
SSP_CFLAGS= \
-DNO_LINT \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
- MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+ MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no
# cross-tools stage
@@ -2577,6 +2577,7 @@
SSP_CFLAGS= \
MK_CASPER=no \
MK_CLANG_EXTRAS=no \
+ MK_CLANG_FORMAT=no \
MK_CLANG_FULL=no \
MK_CTF=no \
MK_DEBUG_FILES=no \
Index: head/lib/clang/libclang/Makefile
===================================================================
--- head/lib/clang/libclang/Makefile
+++ head/lib/clang/libclang/Makefile
@@ -22,7 +22,7 @@
# Explanation of different SRCS variants below:
# SRCS_MIN: always required, even for bootstrap
-# SRCS_EXT: required for MK_CLANG_EXTRAS
+# SRCS_EXT: required for MK_CLANG_EXTRAS || MK_CLANG_FORMAT
# SRCS_FUL: required for MK_CLANG_FULL
# SRCS_LDB: required for MK_LLDB
@@ -686,7 +686,7 @@
SRCS_MIN+= Tooling/Tooling.cpp
SRCS_ALL+= ${SRCS_MIN}
-.if ${MK_CLANG_EXTRAS} != "no"
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no"
SRCS_ALL+= ${SRCS_EXT}
.endif
.if ${MK_CLANG_FULL} != "no"
Index: head/share/mk/src.opts.mk
===================================================================
--- head/share/mk/src.opts.mk
+++ head/share/mk/src.opts.mk
@@ -202,6 +202,7 @@
BHYVE_SNAPSHOT \
BSD_GREP \
CLANG_EXTRAS \
+ CLANG_FORMAT \
DTRACE_TESTS \
EXPERIMENTAL \
GNU_GREP_COMPAT \
@@ -482,6 +483,7 @@
.if ${MK_CLANG} == "no"
MK_CLANG_EXTRAS:= no
+MK_CLANG_FORMAT:= no
MK_CLANG_FULL:= no
MK_LLVM_COV:= no
.endif
Index: head/targets/pseudo/bootstrap-tools/Makefile
===================================================================
--- head/targets/pseudo/bootstrap-tools/Makefile
+++ head/targets/pseudo/bootstrap-tools/Makefile
@@ -43,7 +43,7 @@
MK_HTML=no NO_LINT=yes MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
- MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+ MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
MK_LLDB=no MK_TESTS=no \
MK_INCLUDES=yes
Index: head/targets/pseudo/clang/Makefile.depend
===================================================================
--- head/targets/pseudo/clang/Makefile.depend
+++ head/targets/pseudo/clang/Makefile.depend
@@ -42,7 +42,6 @@
.if ${MK_CLANG_EXTRAS} == "yes"
DIRDEPS+= \
usr.bin/clang/bugpoint \
- usr.bin/clang/clang-format \
usr.bin/clang/llc \
usr.bin/clang/lli \
usr.bin/clang/llvm-ar \
@@ -69,6 +68,10 @@
usr.bin/clang/llvm-xray \
usr.bin/clang/opt \
+.endif
+
+.if ${MK_CLANG_EXTRAS} == "yes" || ${MK_CLANG_FORMAT} == "yes"
+DIRDEPS+= usr.bin/clang/clang-format
.endif
.if ${MK_LLD} == "yes"
Index: head/tools/build/mk/OptionalObsoleteFiles.inc
===================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc
+++ head/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1481,7 +1481,6 @@
.if ${MK_CLANG_EXTRAS} == no
OLD_FILES+=usr/bin/bugpoint
-OLD_FILES+=usr/bin/clang-format
OLD_FILES+=usr/bin/llc
OLD_FILES+=usr/bin/lli
OLD_FILES+=usr/bin/llvm-as
@@ -1515,6 +1514,10 @@
OLD_FILES+=usr/share/man/man1/llvm-link.1.gz
OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
OLD_FILES+=usr/share/man/man1/opt.1.gz
+.endif
+
+.if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
+OLD_FILES+=usr/bin/clang-format
.endif
.if ${MK_CPP} == no
Index: head/tools/build/options/WITH_CLANG_FORMAT
===================================================================
--- head/tools/build/options/WITH_CLANG_FORMAT
+++ head/tools/build/options/WITH_CLANG_FORMAT
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to build clang-format.
Index: head/usr.bin/clang/Makefile
===================================================================
--- head/usr.bin/clang/Makefile
+++ head/usr.bin/clang/Makefile
@@ -18,7 +18,6 @@
.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+= bugpoint
-SUBDIR+= clang-format
SUBDIR+= llc
SUBDIR+= lli
SUBDIR+= llvm-as
@@ -40,6 +39,10 @@
SUBDIR+= llvm-rtdyld
SUBDIR+= llvm-xray
SUBDIR+= opt
+.endif
+
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no"
+SUBDIR+= clang-format
.endif
.if ${MK_LLD} != "no"

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 4, 8:02 AM (10 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29234288
Default Alt Text
D25427.diff (4 KB)

Event Timeline