CLANG_PREFIX macro. This changes the default header search path when we
are building clang as part of cross-tools.
Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: freebsd-current
-fno-rtti. The clang libaries that really use exceptions and virtual
functions can enable LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI
respectively. This saves space on the resulting binaries and follows
what's being done upstream.
Submitted by: Dimitry Andric <dimitry at andric.com>
This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.
Obtained from: projects/clangbsd
I used the following command to determine which source files were
unneeded:
| for i in `find lib/clang -name '*.o'`
| do
| MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
| usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
| sort | uniq -d | wc -l`"
| [ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done
This should slightly improve the build times.
It seems GCC 4.2.1 on PowerPC miscompiles Clang, causing it to crash
when building even simple Hello World applications. Switch back to -O1
for this architecture.
Submitted by: nwhitehorn
Even though it's nice to use posix_spawn() instead of manually using
fork()/exec(), it's better to disable this. FreeBSD 7 doesn't support
this interface. When enabled, we can't build tblgen, which prevents us
from building FreeBSD 9 on 7.
Tested by: raj
I've looked at other places in the source tree where CLANG_VENDOR is
used and I suspect it might not be safe to use newlines here.
CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
it to the imported revision of Clang. I do want to have a date in there,
so slightly modify the code to support CLANG_VENDOR_SUFFIX.