For clang, move the definition of FREEBSD_CC_VERSION into its own header
file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc. The header is only included from one .cpp file in the clang tree. This minimizes the number of .cpp files that need to be rebuilt if the version is bumped. Discussed with: bdrewery
This commit is contained in:
parent
2aa858536f
commit
c371433e4a
@ -99,7 +99,7 @@ _expected_compiler_type= gcc
|
||||
.if ${_expected_compiler_type} == "clang"
|
||||
CROSS_COMPILER_FREEBSD_VERSION!= \
|
||||
awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \
|
||||
${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown
|
||||
${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown
|
||||
CROSS_COMPILER_VERSION!= \
|
||||
awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \
|
||||
${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown
|
||||
|
3
lib/clang/freebsd_cc_version.h
Normal file
3
lib/clang/freebsd_cc_version.h
Normal file
@ -0,0 +1,3 @@
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#define FREEBSD_CC_VERSION 1100004
|
@ -8,5 +8,3 @@
|
||||
#define CLANG_VENDOR "FreeBSD "
|
||||
|
||||
#define SVN_REVISION "262564"
|
||||
|
||||
#define FREEBSD_CC_VERSION 1100004U
|
||||
|
@ -50,3 +50,6 @@ TGHDRS= AttrHasAttributeImpl \
|
||||
|
||||
# XX: work around GCC bug 67888
|
||||
CFLAGS.gcc += -fpermissive
|
||||
|
||||
# Ensure FREEBSD_CC_VERSION is defined for Targets.cpp
|
||||
CFLAGS.Targets.cpp+= -include ../freebsd_cc_version.h
|
||||
|
Loading…
Reference in New Issue
Block a user