Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 2021 22:05:11 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r568205 - head/devel/llvm-devel
Message-ID:  <202103122205.12CM5BT1048797@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Mar 12 22:05:10 2021
New Revision: 568205
URL: https://svnweb.freebsd.org/changeset/ports/568205

Log:
  llvm-devel: Handle unsupported options centrally
  
  Use a loop over all possible options to comment out PLIST entries for
  options not supported on the current platform.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/devel/llvm-devel/Makefile

Modified: head/devel/llvm-devel/Makefile
==============================================================================
--- head/devel/llvm-devel/Makefile	Fri Mar 12 21:47:35 2021	(r568204)
+++ head/devel/llvm-devel/Makefile	Fri Mar 12 22:05:10 2021	(r568205)
@@ -82,6 +82,8 @@ OPTIONS_DEFAULT_powerpc64=     ${OPTIONS_DEFAULT_power
 OPTIONS_DEFAULT_powerpc64_13=  GOLD
 OPTIONS_DEFAULT_powerpc64_14=  GOLD
 OPTIONS_SUB=	yes
+_ALL_OPTIONS=	CLANG COMPILER_RT DOCS EXTRAS FLANG GOLD LIT LLD LLDB MLIR \
+		OPENMP
 
 # Pre-declared for options framework
 LIB_DEPENDS=
@@ -381,23 +383,12 @@ _COMPILER_RT_LIBS+= \
 	libclang_rt.ubsan_standalone_cxx-i386.a
 .endif
 
-.if ! ${OPTIONS_DEFINE:MCOMPILER_RT}
-# Hack to disable COMPILER_RT in plist of unsupported architectures
-PLIST_SUB+=	COMPILER_RT="@comment "
-.else
+# Comment out plist entries for unsupported options.
+.for opt in ${_ALL_OPTIONS}
+.if !${OPTIONS_DEFINE:M${opt}}
+PLIST_SUB+=	${opt}="@comment "
 .endif
-
-.if ! ${OPTIONS_DEFINE:MGOLD}
-# Hack to disable GOLD in plist of unsupported architectures
-PLIST_SUB+=	GOLD="@comment "
-.else
-.endif
-
-.if ! ${OPTIONS_DEFINE:MOPENMP}
-# Hack to disable OPENMP in plist of unsupported architectures
-PLIST_SUB+=	OPENMP="@comment "
-.else
-.endif
+.endfor
 
 post-patch:
 	${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103122205.12CM5BT1048797>