Changeset View
Standalone View
share/mk/src.opts.mk
Show First 20 Lines • Show All 272 Lines • ▼ Show 20 Lines | |||||
# All supported backends for LLVM_TARGET_XXX | # All supported backends for LLVM_TARGET_XXX | ||||
__LLVM_TARGETS= \ | __LLVM_TARGETS= \ | ||||
aarch64 \ | aarch64 \ | ||||
arm \ | arm \ | ||||
mips \ | mips \ | ||||
powerpc \ | powerpc \ | ||||
sparc \ | sparc \ | ||||
x86 | x86 | ||||
__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/ | __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/ | ||||
emaste: Should this part be committed independently now? (I.e., this should be applied regardless of… | |||||
Done Inline ActionsActually this is just a preparation for the flag day, marking this as "Plan Changes" to avoid accidental commit. alfredo: Actually this is just a preparation for the flag day, marking this as "Plan Changes" to avoid… | |||||
Done Inline ActionsI mean, it seems this specific __LLVM_TARGET_FILT change is a bug fix that should go in before the flag day? Any use of Clang on powerpc64 is inherently not the default but needs this change? It doesn't really matter if this doesn't go in until later, just something I wondered about. emaste: I mean, it seems this specific `__LLVM_TARGET_FILT` change is a bug fix that should go in… | |||||
Done Inline Actionsoh yeah, this is bug fix! I guess it could go in before, but I personally didn't verified for undesired side effects with current default ABI. alfredo: oh yeah, this is bug fix! I guess it could go in before, but I personally didn't verified for… | |||||
.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 | ||||
# Disable other targets for arm and armv6, to work around "relocation truncated | # Disable other targets for arm and armv6, to work around "relocation truncated | ||||
# to fit" errors with BFD ld, since libllvm.a will get too large to link. | # to fit" errors with BFD ld, since libllvm.a will get too large to link. | ||||
.elif ${__T} == "arm" || ${__T} == "armv6" | .elif ${__T} == "arm" || ${__T} == "armv6" | ||||
__DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} | __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} | ||||
Show All 11 Lines | |||||
__DEFAULT_NO_OPTIONS+=LLVM_TARGET_RISCV | __DEFAULT_NO_OPTIONS+=LLVM_TARGET_RISCV | ||||
.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" || \ | ||||
${__T} == "powerpc" || ${__T} == "powerpcspe" || ${__T} == "powerpc64") | |||||
Not Done Inline ActionsI think this can be ${__T:Mpowerpc*}, but needs to be tested. jhibbits: I think this can be ${__T:Mpowerpc*}, but needs to be tested. | |||||
Not Done Inline ActionsActually, this can be ${TT} == "powerpc", because ${TT} is ${MACHINE} jhibbits: Actually, this can be ${__TT} == "powerpc", because ${__TT} is ${MACHINE} | |||||
# 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 | ||||
__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 | ||||
# Everything else disables Clang, and uses GCC instead. | # Everything else disables Clang, and uses GCC instead. | ||||
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC | __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC | ||||
__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD | __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD | ||||
.endif | .endif | ||||
# In-tree binutils/gcc are older versions without modern architecture support. | # In-tree binutils/gcc are older versions without modern architecture support. | ||||
.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" | .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" | ||||
BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB | BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB | ||||
.endif | .endif | ||||
.if ${__T:Mriscv*} != "" | .if ${__T:Mriscv*} != "" | ||||
BROKEN_OPTIONS+=OFED | BROKEN_OPTIONS+=OFED | ||||
.endif | .endif | ||||
.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv6" || \ | .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv6" || \ | ||||
Not Done Inline ActionsSame here. libunwind needs a little love for powerpcspe, but I won't hold up the move. jhibbits: Same here. libunwind needs a little love for powerpcspe, but I won't hold up the move. | |||||
${__T} == "armv7" || ${__T} == "i386" || ${__T:Mriscv*} != "" || \ | ${__T} == "armv7" || ${__T} == "i386" || ${__T:Mriscv*} != "" || \ | ||||
${__TT} == "mips" | ${__TT} == "mips" || ${__T} == "powerpc" || ${__T} == "powerpcspe" || \ | ||||
${__T} == "powerpc64" | |||||
__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND | __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND | ||||
Done Inline ActionsI suppose we cannot turn LLVM_LIBUNWIND on in advance (with gcc 4.2.1) emaste: I suppose we cannot turn `LLVM_LIBUNWIND` on in advance (with gcc 4.2.1) | |||||
Done Inline ActionsTrue. This need to wait for the flag day. alfredo: True. This need to wait for the flag day. | |||||
.else | .else | ||||
__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND | __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND | ||||
.endif | .endif | ||||
.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv6" || \ | .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv6" || \ | ||||
${__T} == "armv7" || ${__T} == "i386" | ${__T} == "armv7" || ${__T} == "i386" || ${__T} == "powerpc64" | ||||
__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD | __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD | ||||
.else | .else | ||||
__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD | __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD | ||||
.endif | .endif | ||||
.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" | .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" | ||||
__DEFAULT_YES_OPTIONS+=LLDB | __DEFAULT_YES_OPTIONS+=LLDB | ||||
.else | .else | ||||
__DEFAULT_NO_OPTIONS+=LLDB | __DEFAULT_NO_OPTIONS+=LLDB | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |
Should this part be committed independently now? (I.e., this should be applied regardless of what the default is?)