Date: Sat, 29 Feb 2020 13:15:01 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358462 - head/share/mk Message-ID: <202002291315.01TDF1Dd047218@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Sat Feb 29 13:15:01 2020 New Revision: 358462 URL: https://svnweb.freebsd.org/changeset/base/358462 Log: src.opts.mk: simplify Clang and lld bootstrap defaults With the retirement of GCC 4.2.1 we can assume the host compiler supports C++11, and can simplify the Clang and LLD defaults. Clang and lld are now enabled by default everywhere, and are used as the bootstrap compiler and linker for all targets except MIPS. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Feb 29 12:46:02 2020 (r358461) +++ head/share/mk/src.opts.mk Sat Feb 29 13:15:01 2020 (r358462) @@ -78,6 +78,7 @@ __DEFAULT_YES_OPTIONS = \ CASPER \ CCD \ CDDL \ + CLANG \ CPP \ CROSS_COMPILER \ CRYPT \ @@ -126,6 +127,7 @@ __DEFAULT_YES_OPTIONS = \ LEGACY_CONSOLE \ LIBPTHREAD \ LIBTHR \ + LLD \ LLVM_COV \ LLVM_TARGET_ALL \ LOADER_GELI \ @@ -287,22 +289,13 @@ MK_LLVM_TARGET_SPARC:=no __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF .include <bsd.compiler.mk> -# If the compiler is not C++11 capable, disable Clang. External toolchain will -# be required. -.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips") -# Clang is enabled, and will be installed as the default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD -.elif ${COMPILER_FEATURES:Mc++11} -# If an external compiler that supports C++11 is used as ${CC} and Clang -# supports the target, then Clang is enabled but we still require an external -# toolchain. -# default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG LLD -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC +.if ${__TT} != "mips" +# Clang is installed as the default /usr/bin/cc. +__DEFAULT_YES_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else -# Everything else disables Clang, and uses GCC instead. -__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD +# Clang is enabled but we still require an external toolchain. +__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .endif # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T:Mriscv*} != ""
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002291315.01TDF1Dd047218>