<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/99b6a78ddf9eabc4f76fb3deb00615721100092d">https://github.com/macports/macports-ports/commit/99b6a78ddf9eabc4f76fb3deb00615721100092d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 99b6a78ddf9eabc4f76fb3deb00615721100092d
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Wed Nov 18 14:31:37 2020 -0800
<span style='display:block; white-space:pre;color:#404040;'> clang-{9.0,10}: allow 11.0 as deployment tgt
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> backport of upstream patch
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> https://github.com/llvm/llvm-project/commit/f724ce0d73eb3f85364e346a036588825bc47567
</span>---
lang/llvm-10/Portfile | 11 +++++---
.../files/clang-driver-support-11.x-target.diff | 31 ++++++++++++++++++++++
lang/llvm-9.0/Portfile | 11 +++++---
.../files/clang-driver-support-11.x-target.diff | 31 ++++++++++++++++++++++
4 files changed, 78 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-10/Portfile b/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 71f0253a060..e06cd8f80b3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,8 +11,8 @@ set clang_executable_version 10
</span> set lldb_executable_version 10
name llvm-${llvm_version}
revision 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport clang-${llvm_version} { revision 1 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lldb-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport clang-${llvm_version} { revision 2 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lldb-${llvm_version} { revision 1 }
</span> set suffix mp-${llvm_version}
set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
dist_subdir llvm
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -153,6 +153,10 @@ if {${subport} eq "clang-${llvm_version}"} {
</span> 5001-patch-libcxx-src-new-posix-memalign-leopard.diff \
5002-patch-toolchains-darwin-add-back-pre-10.6-link-libs.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Understand deployment target of 11.x on Big Sur
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/61525
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append clang-driver-support-11.x-target.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # fix incorrect disabling of bad_optional/variant/any_access on 10.13
# https://github.com/macports/macports-base/pull/179
patchfiles-append patch-libcxx-includes-config-optional-1013.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,7 +173,8 @@ if {${subport} eq "lldb-${llvm_version}"} {
</span> 1005-Fixup-libstdc-header-search-paths-for-older-versions.patch \
1006-Fix-build-issues-pre-Lion-due-to-missing-a-strnlen-d.patch \
1007-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- openmp-locations.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openmp-locations.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang-driver-support-11.x-target.diff
</span> }
configure.post_args ../${worksrcdir}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-10/files/clang-driver-support-11.x-target.diff b/lang/llvm-10/files/clang-driver-support-11.x-target.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..9b7f5ff9c92
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-10/files/clang-driver-support-11.x-target.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5de7d7132df..48b4e5159f5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./tools/clang/lib/Driver/ToolChains/Darwin.cpp.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./tools/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1759,7 +1759,7 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (Platform == MacOS) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!Driver::GetReleaseVersion(OSTarget->getOSVersion(), Major, Minor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Micro, HadExtra) ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- HadExtra || Major != 10 || Minor >= 100 || Micro >= 100)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ HadExtra || Major < 10 || Major >= 100 || Minor >= 100 || Micro >= 100)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getDriver().Diag(diag::err_drv_invalid_version_number)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ << OSTarget->getAsString(Args, Opts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (Platform == IPhoneOS) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/test/Driver/darwin-version.c b/clang/test/Driver/darwin-version.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7885b596462..d823d151eda 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./tools/clang/test/Driver/darwin-version.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./tools/clang/test/Driver/darwin-version.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -305,3 +305,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // RUN: %clang -target armv7k-apple-ios10.1-simulator -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // RUN: FileCheck --check-prefix=CHECK-VERSION-TENV-SIM2 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // CHECK-VERSION-TENV-SIM2: "thumbv7k-apple-ios10.1.0-simulator"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-macos11 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-darwin20 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=11 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// CHECK-MACOS11: "x86_64-apple-macosx11.0.0"
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-9.0/Portfile b/lang/llvm-9.0/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 8f9114094ce..d5613da06dc 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-9.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-9.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,8 +15,8 @@ set clang_executable_version 9
</span> set lldb_executable_version 9.0.0
name llvm-${llvm_version}
revision 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport clang-${llvm_version} { revision 1 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-subport lldb-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport clang-${llvm_version} { revision 2 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lldb-${llvm_version} { revision 1 }
</span> set suffix mp-${llvm_version}
set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
dist_subdir llvm
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -191,6 +191,10 @@ if {${subport} eq "clang-${llvm_version}"} {
</span> 5001-patch-libcxx-src-new-posix-memalign-leopard.diff \
5002-patch-toolchains-darwin-add-back-pre-10.6-link-libs.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Understand deployment target of 11.x on Big Sur
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/61525
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append clang-driver-support-11.x-target.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # fix incorrect disabling of bad_optional/variant/any_access on 10.13
# https://github.com/macports/macports-base/pull/179
patchfiles-append patch-libcxx-includes-config-optional-1013.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -218,7 +222,8 @@ if {${subport} eq "lldb-${llvm_version}"} {
</span> 1005-Fixup-libstdc-header-search-paths-for-older-versions.patch \
1006-Fix-build-issues-pre-Lion-due-to-missing-a-strnlen-d.patch \
1007-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- openmp-locations.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openmp-locations.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang-driver-support-11.x-target.diff
</span>
# https://llvm.org/bugs/show_bug.cgi?id=25681
if {${worksrcdir} eq "trunk" || ${worksrcdir} eq "release_${llvm_version_no_dot}"} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-9.0/files/clang-driver-support-11.x-target.diff b/lang/llvm-9.0/files/clang-driver-support-11.x-target.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..9b7f5ff9c92
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-9.0/files/clang-driver-support-11.x-target.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5de7d7132df..48b4e5159f5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./tools/clang/lib/Driver/ToolChains/Darwin.cpp.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./tools/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1759,7 +1759,7 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (Platform == MacOS) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!Driver::GetReleaseVersion(OSTarget->getOSVersion(), Major, Minor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Micro, HadExtra) ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- HadExtra || Major != 10 || Minor >= 100 || Micro >= 100)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ HadExtra || Major < 10 || Major >= 100 || Minor >= 100 || Micro >= 100)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getDriver().Diag(diag::err_drv_invalid_version_number)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ << OSTarget->getAsString(Args, Opts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (Platform == IPhoneOS) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/test/Driver/darwin-version.c b/clang/test/Driver/darwin-version.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7885b596462..d823d151eda 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./tools/clang/test/Driver/darwin-version.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./tools/clang/test/Driver/darwin-version.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -305,3 +305,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // RUN: %clang -target armv7k-apple-ios10.1-simulator -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // RUN: FileCheck --check-prefix=CHECK-VERSION-TENV-SIM2 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // CHECK-VERSION-TENV-SIM2: "thumbv7k-apple-ios10.1.0-simulator"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-macos11 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-darwin20 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=11 -c %s -### 2>&1 | \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// CHECK-MACOS11: "x86_64-apple-macosx11.0.0"
</span></pre><pre style='margin:0'>
</pre>