From owner-svn-ports-head@freebsd.org Fri Mar 12 22:05:11 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E5625AE928; Fri, 12 Mar 2021 22:05:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dy0HC47psz4vvj; Fri, 12 Mar 2021 22:05:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 812B71F1CF; Fri, 12 Mar 2021 22:05:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 12CM5BkD048798; Fri, 12 Mar 2021 22:05:11 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 12CM5BT1048797; Fri, 12 Mar 2021 22:05:11 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202103122205.12CM5BT1048797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 12 Mar 2021 22:05:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568205 - head/devel/llvm-devel X-SVN-Group: ports-head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/devel/llvm-devel X-SVN-Commit-Revision: 568205 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 22:05:11 -0000 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}|' \