Changeset View
Changeset View
Standalone View
Standalone View
share/mk/src.opts.mk
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | |||||
.else | .else | ||||
__TT=${MACHINE} | __TT=${MACHINE} | ||||
.endif | .endif | ||||
# All supported backends for LLVM_TARGET_XXX | # All supported backends for LLVM_TARGET_XXX | ||||
__LLVM_TARGETS= \ | __LLVM_TARGETS= \ | ||||
aarch64 \ | aarch64 \ | ||||
arm \ | arm \ | ||||
mips \ | mips \ | ||||
bdrewery: Actually now I'm not so sure if we should enable BPF by default.
I think it makes more sense to… | |||||
Not Done Inline ActionsLet's add it now, but disabled by default, and we can enable it later on when it is needed. dim: Let's add it now, but disabled by default, and we can enable it later on when it is needed. | |||||
powerpc \ | powerpc \ | ||||
sparc \ | sparc \ | ||||
x86 | x86 | ||||
__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/ | __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/ | ||||
.for __llt in ${__LLVM_TARGETS} | .for __llt in ${__LLVM_TARGETS} | ||||
# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. | # Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. | ||||
.if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} | .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} | ||||
__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG | __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG | ||||
# aarch64 needs arm for -m32 support. | # aarch64 needs arm for -m32 support. | ||||
.elif ${__TT} == "arm64" && ${__llt} == "arm" | .elif ${__TT} == "arm64" && ${__llt} == "arm" | ||||
__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 | __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 | ||||
# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL | # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL | ||||
# which is based on MK_CLANG. | # which is based on MK_CLANG. | ||||
.else | .else | ||||
__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL | __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
__DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF | |||||
.include <bsd.compiler.mk> | .include <bsd.compiler.mk> | ||||
# If the compiler is not C++11 capable, disable Clang and use GCC instead. | # If the compiler is not C++11 capable, disable Clang and use GCC instead. | ||||
# This means that architectures that have GCC 4.2 as default can not | # This means that architectures that have GCC 4.2 as default can not | ||||
# build Clang without using an external compiler. | # build Clang without using an external compiler. | ||||
.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ | .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ | ||||
${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") | ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") | ||||
# Clang is enabled, and will be installed as the default /usr/bin/cc. | # Clang is enabled, and will be installed as the default /usr/bin/cc. | ||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD | __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD | ||||
Not Done Inline ActionsI'm not sure if we want to enable this target by default? (I have another patch which adds *all* supported LLVM targets, but is does not enable them by default.) I suppose it does not add too much build time, but still, I would rather avoid complaints of "yet another CPU cycle taken by LLVM's huge build". :) dim: I'm not sure if we want to enable this target by default? (I have another patch which adds… | |||||
Not Done Inline ActionsGood question. As @bdrewery is changing the bootstrap compiler to build only the needed target by default, and moving to one compiler for universe, I suppose it's not a big deal to add it by default... but perhaps we should leave it off by default until use cases are in the three or ready. emaste: Good question. As @bdrewery is changing the bootstrap compiler to build only the needed target… | |||||
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC | __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC | ||||
.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" | .elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" | ||||
# If an external compiler that supports C++11 is used as ${CC} and Clang | # If an external compiler that supports C++11 is used as ${CC} and Clang | ||||
# supports the target, then Clang is enabled but GCC is installed as the | # supports the target, then Clang is enabled but GCC is installed as the | ||||
# default /usr/bin/cc. | # default /usr/bin/cc. | ||||
__DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD | __DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD | ||||
__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC | __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC | ||||
.else | .else | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |
Actually now I'm not so sure if we should enable BPF by default.
I think it makes more sense to keep it off-by-default until there is a more compelling reason to enable it (like your kernel support is merged).
On the otherhand this is only adding a handful of files so the complaints may not come if it is on-by-default.