]> granicus.if.org Git - clang/commit
Make __FreeBSD_cc_version predefined macro configurable at build time
authorDimitry Andric <dimitry@andric.com>
Fri, 20 May 2016 17:27:22 +0000 (17:27 +0000)
committerDimitry Andric <dimitry@andric.com>
Fri, 20 May 2016 17:27:22 +0000 (17:27 +0000)
commite36a6725b91faf63bad55b0a212defedcf22448a
tree155f7eb3f87d499f5614cc5dada4a3eafc5bed48
parentad2e1d307d516a7f8a403bddf1baeb28861964a5
Make __FreeBSD_cc_version predefined macro configurable at build time

The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version`
predefined macro to a rather static value, calculated from the major OS
version.

In the FreeBSD base system, we will start incrementing the value of this
macro whenever we make any signifant change to clang, so we need a way
to configure the macro's value at build time.

Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD
build system using either the `-D` command line option, or an include
file.  Stock builds will keep the earlier value.

Differential Revision: http://reviews.llvm.org/D20037

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270240 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp