git: 5390741fcfd8 - 2021Q2 - llvm12: rework handling undefined options
Jan Beich
jbeich at FreeBSD.org
Fri Apr 23 16:14:07 UTC 2021
The branch 2021Q2 has been updated by jbeich:
URL: https://cgit.FreeBSD.org/ports/commit/?id=5390741fcfd802145f2cd2cdff5bceb292594f1e
commit 5390741fcfd802145f2cd2cdff5bceb292594f1e
Author: Brooks Davis <brooks at FreeBSD.org>
AuthorDate: 2021-04-07 17:26:40 +0000
Commit: Jan Beich <jbeich at FreeBSD.org>
CommitDate: 2021-04-23 16:11:02 +0000
llvm12: rework handling undefined options
Define a list of options and for any that aren't defined for the current
architecture add a PLIST_SUB entry as through the option were defined and
disabled.
(cherry picked from commit c9a3a7442f64da0f932d4e6934218c1acd684d25)
---
devel/llvm12/Makefile | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/devel/llvm12/Makefile b/devel/llvm12/Makefile
index 67f4d5f2764e..7ef190aa2f48 100644
--- a/devel/llvm12/Makefile
+++ b/devel/llvm12/Makefile
@@ -90,6 +90,8 @@ OPTIONS_DEFAULT_powerpc64le= GOLD OPENMP
OPTIONS_SINGLE= BACKENDS
OPTIONS_SINGLE_BACKENDS=BE_FREEBSD BE_NATIVE BE_STANDARD
OPTIONS_SUB= yes
+# All non-backend options
+_ALL_OPTIONS= CLANG COMPILER_RT DOCS EXTRAS GOLD LIT LLD LLDB PYCLANG OPENMP
BE_AMDGPU_DESC= AMD GPU backend (required by mesa)
BE_FREEBSD_DESC= Backends for FreeBSD architectures
@@ -437,23 +439,12 @@ CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
.endif
-.if ! ${OPTIONS_DEFINE:MCOMPILER_RT}
-# Hack to disable COMPILER_RT in plist of unsupported architectures
-PLIST_SUB+= COMPILER_RT="@comment "
-.else
-.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
+# Comment out plist entries for unsupported options.
+.for opt in ${_ALL_OPTIONS}
+.if !${OPTIONS_DEFINE:M${opt}}
+PLIST_SUB+= ${opt}="@comment "
.endif
+.endfor
post-patch:
${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \
More information about the dev-commits-ports-all
mailing list