svn commit: r568205 - head/devel/llvm-devel
Brooks Davis
brooks at FreeBSD.org
Fri Mar 12 22:05:11 UTC 2021
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}|' \
More information about the svn-ports-head
mailing list