Build clang libraries by default with -fno-exceptions and with
-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 is contained in:
parent
7d54a05ac8
commit
582a734e13
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210388
@ -17,6 +17,17 @@ TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
# XXX: 8.0, to keep __FreeBSD_cc_version happy
|
||||
CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\"
|
||||
|
||||
.ifndef LLVM_REQUIRES_EH
|
||||
CFLAGS+=-fno-exceptions
|
||||
.else
|
||||
# If the library or program requires EH, it also requires RTTI.
|
||||
LLVM_REQUIRES_RTTI=
|
||||
.endif
|
||||
|
||||
.ifndef LLVM_REQUIRES_RTTI
|
||||
CFLAGS+=-fno-rtti
|
||||
.endif
|
||||
|
||||
.PATH: ${LLVM_SRCS}/${SRCDIR}
|
||||
|
||||
TBLGEN=tblgen ${CFLAGS:M-I*}
|
||||
|
@ -35,6 +35,7 @@ SRCS= AsmWriter.cpp \
|
||||
ValueSymbolTable.cpp \
|
||||
ValueTypes.cpp \
|
||||
Verifier.cpp
|
||||
LLVM_REQUIRES_RTTI=
|
||||
|
||||
TGHDRS= Intrinsics
|
||||
|
||||
|
@ -48,5 +48,6 @@ SRCS= APFloat.cpp \
|
||||
regexec.c \
|
||||
regfree.c \
|
||||
regstrlcpy.c
|
||||
LLVM_REQUIRES_RTTI=
|
||||
|
||||
.include "../clang.lib.mk"
|
||||
|
@ -22,5 +22,6 @@ SRCS= Alarm.cpp \
|
||||
Threading.cpp \
|
||||
TimeValue.cpp \
|
||||
Valgrind.cpp
|
||||
LLVM_REQUIRES_RTTI=
|
||||
|
||||
.include "../clang.lib.mk"
|
||||
|
@ -40,6 +40,7 @@ SRCS= ARMDecoderEmitter.cpp \
|
||||
X86DisassemblerTables.cpp \
|
||||
X86RecognizableInstr.cpp
|
||||
MAN=
|
||||
LLVM_REQUIRES_EH=
|
||||
|
||||
LIBDEPS=llvmsupport llvmsystem
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user