<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/deae102edeb3b7301e60bd2847d0b9d50b747c52">https://github.com/macports/macports-ports/commit/deae102edeb3b7301e60bd2847d0b9d50b747c52</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new deae102edeb LLVM 14: Attempt to fix builds on < macOS10.12
</span>deae102edeb is described below
<span style='display:block; white-space:pre;color:#808000;'>commit deae102edeb3b7301e60bd2847d0b9d50b747c52
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Mon Mar 28 10:49:59 2022 +0100
<span style='display:block; white-space:pre;color:#404040;'> LLVM 14: Attempt to fix builds on < macOS10.12
</span>---
lang/llvm-14/Portfile | 6 ++++++
lang/llvm-14/files/0031-Avoid-Use-Of-Clonefile.patch | 13 +++++++++++++
2 files changed, 19 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/Portfile b/lang/llvm-14/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a5c8e2b5c44..24a0476b774 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-14/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-14/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -154,6 +154,12 @@ if {${os.platform} eq "darwin" && ${os.major} < 16} {
</span> patchfiles-append 0100-define-target-os-osx.patch
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.platform} eq "darwin" && ${os.major} < 116} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Avoid attempts to use 'clonefile'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # llvm/lib/Support/Unix/Path.inc:1476:10: error: use of undeclared identifier 'clonefile'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0031-Avoid-Use-Of-Clonefile.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-patch {
reinplace "s|@@PREFIX@@|${prefix}|" \
${patch.dir}/clang/lib/Driver/ToolChains/Clang.cpp \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0031-Avoid-Use-Of-Clonefile.patch b/lang/llvm-14/files/0031-Avoid-Use-Of-Clonefile.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f2607bb2de4
</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-14/files/0031-Avoid-Use-Of-Clonefile.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 788460d..c52dc72 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/lib/Support/Unix/Path.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/lib/Support/Unix/Path.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1462,7 +1462,7 @@ namespace fs {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ std::error_code copy_file(const Twine &From, const Twine &To) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ std::string FromS = From.str();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ std::string ToS = To.str();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if __has_builtin(__builtin_available)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (__builtin_available(macos 10.12, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Optimistically try to use clonefile() and handle errors, rather than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // calling stat() to see if it'll work.
</span></pre><pre style='margin:0'>
</pre>