mirror of
https://github.com/opnsense/src.git
synced 2026-04-03 16:35:27 -04:00
This makes it possible, through src.conf(5) settings, to select which LLVM targets you want to build during buildworld. The current list is: * (WITH|WITHOUT)_LLVM_TARGET_AARCH64 * (WITH|WITHOUT)_LLVM_TARGET_ARM * (WITH|WITHOUT)_LLVM_TARGET_MIPS * (WITH|WITHOUT)_LLVM_TARGET_POWERPC * (WITH|WITHOUT)_LLVM_TARGET_SPARC * (WITH|WITHOUT)_LLVM_TARGET_X86 To not influence anything right now, all of these are on by default, in situations where clang is enabled. Selectively turning a few targets off manually should work. Turning on only one target should work too, even if that target does not correspond to the build architecture. (In that case, LLVM_NATIVE_ARCH will not be defined, and you can only use the resulting clang executable for cross-compiling.) I performed a few measurements on one of the FreeBSD.org reference machines, building clang from scratch, with all targets enabled, and with only the x86 target enabled. The latter was ~12% faster in real time (on a 32-core box), and ~14% faster in user time. For a full buildworld the difference will probably be less pronounced, though. Reviewed by: bdrewery MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11077
26 lines
522 B
Modula-2
26 lines
522 B
Modula-2
/* $FreeBSD$ */
|
|
|
|
#ifndef LLVM_DISASSEMBLER
|
|
# error Please define the macro LLVM_DISASSEMBLER(TargetName)
|
|
#endif
|
|
|
|
#ifdef LLVM_TARGET_ENABLE_AARCH64
|
|
LLVM_DISASSEMBLER(AArch64)
|
|
#endif
|
|
#ifdef LLVM_TARGET_ENABLE_ARM
|
|
LLVM_DISASSEMBLER(ARM)
|
|
#endif
|
|
#ifdef LLVM_TARGET_ENABLE_MIPS
|
|
LLVM_DISASSEMBLER(Mips)
|
|
#endif
|
|
#ifdef LLVM_TARGET_ENABLE_POWERPC
|
|
LLVM_DISASSEMBLER(PowerPC)
|
|
#endif
|
|
#ifdef LLVM_TARGET_ENABLE_SPARC
|
|
LLVM_DISASSEMBLER(Sparc)
|
|
#endif
|
|
#ifdef LLVM_TARGET_ENABLE_X86
|
|
LLVM_DISASSEMBLER(X86)
|
|
#endif
|
|
|
|
#undef LLVM_DISASSEMBLER
|