Author: bdrewery
Date: Tue Dec 10 18:50:50 2019
New Revision: 355588
URL: https://svnweb.freebsd.org/changeset/base/355588

Log:
  Fix WITHOUT_CLANG build.
  
  This decouples MK_LLVM_TARGET_ALL from MK_CLANG. It is fine if
  LLVM_TARGET_* are set even if MK_CLANG is disabled. It never
  made sense to depend MK_LLVM_TARGET_* to MK_CLANG (which I did
  in r335706).
  
  PR:           240507
  Reported by:  kevans, swills
  MFC after:    2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk   Tue Dec 10 18:15:20 2019        (r355587)
+++ head/share/mk/src.opts.mk   Tue Dec 10 18:50:50 2019        (r355588)
@@ -128,6 +128,7 @@ __DEFAULT_YES_OPTIONS = \
     LIBPTHREAD \
     LIBTHR \
     LLVM_COV \
+    LLVM_TARGET_ALL \
     LOADER_GELI \
     LOADER_LUA \
     LOADER_OFW \
@@ -219,7 +220,6 @@ __DEFAULT_NO_OPTIONS = \
 # RIGHT option is disabled.
 __DEFAULT_DEPENDENT_OPTIONS= \
        CLANG_FULL/CLANG \
-       LLVM_TARGET_ALL/CLANG \
        LOADER_VERIEXEC/BEARSSL \
        LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \
        VERIEXEC/BEARSSL \
@@ -281,9 +281,9 @@ __LLVM_TARGETS= \
                x86
 __LLVM_TARGET_FILT=    
C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/
 .for __llt in ${__LLVM_TARGETS}
-# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG.
+# Default enable the given TARGET's LLVM_TARGET support
 .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+__DEFAULT_YES_OPTIONS+=        LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}
 # Disable other targets for arm, to work around "relocation truncated
 # to fit" errors with BFD ld, since libllvm.a will get too large to link.
 .elif ${__T} == "arm"
@@ -291,8 +291,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu}
 # aarch64 needs arm for -m32 support.
 .elif ${__TT} == "arm64" && ${__llt} == "arm"
 __DEFAULT_DEPENDENT_OPTIONS+=  LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
-# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
-# which is based on MK_CLANG.
+# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL.
 .else
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .endif
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to