<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/39fa5b0a30953a20989c34d12ea7f1e58c1fb938">https://github.com/macports/macports-ports/commit/39fa5b0a30953a20989c34d12ea7f1e58c1fb938</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 39fa5b0a309 LLVM 14: New compiler suite
</span>39fa5b0a309 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 39fa5b0a30953a20989c34d12ea7f1e58c1fb938
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Wed Mar 23 23:15:16 2022 +0000
<span style='display:block; white-space:pre;color:#404040;'> LLVM 14: New compiler suite
</span>---
lang/llvm-14/Portfile | 545 +++++++++++++++++++++
...-MacPorts-only-clang-use-MP-omp-locations.patch | 50 ++
...ly-Don-t-embed-the-deployment-target-in-t.patch | 22 +
...ly-Prepare-clang-format-for-replacement-w.patch | 82 ++++
...ly-Fix-name-of-scan-view-executable-insid.patch | 25 +
.../0005-clang-support-macports-libstdcxx.patch | 202 ++++++++
...MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch | 32 ++
...nly-call-pthread_setname_np-if-we-have-it.patch | 26 +
...nly-call-setpriority-PRIO_DARWIN_THREAD-0.patch | 25 +
...-Unix-Path.inc-define-COPYFILE_CLONE-if-n.patch | 14 +
...-cmake-config-ix.cmake-was-Leopard-No-ASA.patch | 26 +
...-long-long-math-prototypes-when-using-the.patch | 49 ++
...er-rt-add-some-defs-missing-in-older-SDKs.patch | 47 ++
...ack-runtime-libraries-used-on-10.4-and-10.patch | 39 ++
...oat.h-to-work-on-Snow-Leopard-and-earlier.patch | 21 +
...dc-header-search-paths-for-older-versions.patch | 34 ++
...0.10-and-less-compiler-rt-find-macosx-sdk.patch | 44 ++
...ss-libcxx-work-around-no-reexported_symbo.patch | 43 ++
...ss-clang-default-to-libc-on-all-darwin-sy.patch | 26 +
...0.6-and-less-use-emulated-TLS-before-10.7.patch | 58 +++
...ss-work-around-no-directory-watcher-befor.patch | 25 +
...nd-less-libcxx-disable-Availability-tests.patch | 35 ++
.../0022-10.5-and-less-default-to-fno-blocks.patch | 24 +
...ss-use-older-cfname-and-fix-uuid-on-leopa.patch | 30 ++
...ss-compiler-rt-work-around-no-libdispatch.patch | 64 +++
...25-lldb-add-defines-needed-for-older-SDKs.patch | 55 +++
lang/llvm-14/files/0100-define-target-os-osx.patch | 13 +
lang/llvm-14/files/llvm-bin | 7 +
lang/llvm-14/files/llvm-bin-compat | 2 +
lang/llvm-14/files/mp-clang-14 | 34 ++
lang/llvm-14/files/mp-llvm-14 | 60 +++
31 files changed, 1759 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/Portfile b/lang/llvm-14/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a5c8e2b5c44
</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/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,545 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup select 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup active_variants 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup legacysupport 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Do not propagate c/c++ standards as set by base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.set_c_standard no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.set_cxx_standard no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# link legacysupport statically for compilers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+legacysupport.use_static yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Sysconf wrapping causes issues so disable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+legacysupport.disable_function_wrap yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories lang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license NCSA
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set llvm_version 14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version ${llvm_version}.0.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name llvm-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport mlir-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport clang-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport lldb-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport flang-${llvm_version} { revision 0 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 098088bcf17effbdeae316e9082312b1d7f0f4f3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 35ce9edbc8f774fe07c8f4acdf89ec8ac695c8016c165dd86b8d10e7cba07e23 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 105585028
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname llvm-project-${version}.src
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_xz yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+dist_subdir llvm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set suffix mp-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+worksrcdir ${worksrcdir}/llvm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# hand-tweaked, approximately c++ standard 2017
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist *gcc* {clang < 1001} macports-clang-3.*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# clang-13/work/build/include/c++/v1/optional:224:5: error: destructor cannot be marked constexpr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__optional_destruct_base()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append {clang < 1204} {macports-clang-[5-9].0}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.fallback clang macports-clang-11 macports-clang-10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# We can't use Ninja with our custom destrooting plan for llvm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#cmake.generator Ninja
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.install_prefix ${sub_prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.build_type Release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# clean up some cmake-PG added values we don't want to use, because we want @rpaths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.install_rpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.pre_args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_NAME_DIR=${cmake.install_prefix}/lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_RPATH=${cmake.install_prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.pre_args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.pre_args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_SYSTEM_PREFIX_PATH="${prefix}\;/usr" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_SYSTEM_PREFIX_PATH="${cmake.install_prefix}\;${prefix}\;/usr"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_LINK_LLVM_DYLIB=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_RTTI=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_INCLUDE_TESTS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_INCLUDE_EXAMPLES=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_FFI=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFFI_INCLUDE_DIR=${prefix}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFFI_LIBRARY_DIR=${prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# cctools is needed to handle objects from newer clang toolchains
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match macports-clang-* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:cctools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_skip_archcheck-append cctools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCMAKE_LIBTOOL=${prefix}/bin/libtool
</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;'>+set py_ver 3.10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set py_ver_nodot [string map {. {}} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append port:python${py_ver_nodot} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${py_ver_nodot}-pygments \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${py_ver_nodot}-yaml
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythonfullpath ${prefix}/bin/python${py_ver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DPython3_EXECUTABLE=${pythonfullpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxx_stdlib libc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libcxx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs i386 x86_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists /usr/lib/libc++.dylib]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "$name requires a C++11 runtime, which your configuration does not allow"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "unsupported configuration"
</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;'>+ }
</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;'>+patch.dir ${workpath}/${distname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patch.pre_args -p1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0001-MacPorts-only-clang-use-MP-omp-locations.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0002-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0003-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0004-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0006-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0007-Threading-Only-call-pthread_setname_np-if-we-have-it.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0008-Threading-Only-call-setpriority-PRIO_DARWIN_THREAD-0.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0009-lib-Support-Unix-Path.inc-define-COPYFILE_CLONE-if-n.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0010-compiler-rt-cmake-config-ix.cmake-was-Leopard-No-ASA.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0011-Fix-missing-long-long-math-prototypes-when-using-the.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0012-compiler-rt-add-some-defs-missing-in-older-SDKs.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0013-clang-add-back-runtime-libraries-used-on-10.4-and-10.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0014-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0015-Fixup-libstdc-header-search-paths-for-older-versions.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0025-lldb-add-defines-needed-for-older-SDKs.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.platform} eq "darwin" && ${os.major} < 14} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0016-10.10-and-less-compiler-rt-find-macosx-sdk.patch
</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;'>+if {${os.platform} eq "darwin" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0017-10.6-and-less-libcxx-work-around-no-reexported_symbo.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0020-10.6-and-less-work-around-no-directory-watcher-befor.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0021-10.6-and-less-libcxx-disable-Availability-tests.patch
</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;'>+if {${os.platform} eq "darwin" && ${os.major} < 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0022-10.5-and-less-default-to-fno-blocks.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0023-10.5-and-less-use-older-cfname-and-fix-uuid-on-leopa.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0024-10.5-and-less-compiler-rt-work-around-no-libdispatch.patch
</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;'>+if {${os.platform} eq "darwin" && ${os.major} < 16} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # error: 'TARGET_OS_OSX' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0100-define-target-os-osx.patch
</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;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@PREFIX@@|${prefix}|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Clang.cpp \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/CommonArgs.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@CLANG_FORMAT_PATH@|${prefix}/bin/clang-format-${suffix}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/clang-format/clang-format-bbedit.applescript \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/clang-format/clang-format-diff.py \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/clang-format/clang-format-sublime.py \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/clang-format/clang-format.el \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/clang-format/clang-format.py
</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;'>+if {${subport} eq "llvm-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ homepage https://llvm.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description llvm is a next generation compiler infrastructure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description The LLVM Core libraries provide a modern source- and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target-independent optimizer, along with code \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ generation support for many popular CPUs (as well as \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ some less common ones!) These libraries are built \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ around a well specified code representation known as \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the LLVM intermediate representation ("LLVM IR").
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libedit port:libffi port:ncurses path:lib/libxar.dylib:xar port:zlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:llvm_select
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.group llvm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.file ${filespath}/mp-${subport}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_PROJECTS="polly"
</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;'>+if {${subport} eq "mlir-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ homepage https://mlir.llvm.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description The MLIR project is a novel approach to building reusable \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and extensible compiler infrastructure.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description {*}${description} MLIR aims to address software fragmentation, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ improve compilation for heterogeneous hardware, significantly \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reduce the cost of building domain specific compilers, and aid \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in connecting existing compilers together.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:llvm-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_PROJECTS="mlir"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # we have to run the destroot like this, because individual targets for each of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # components we want to install are not available; we want "everything but llvm"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/tools/mlir && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${subport} eq "clang-${llvm_version}" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ homepage https://clang.llvm.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description C, C++, Objective C and Objective C++ compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description Clang is an "LLVM native" C/C++/Objective-C compiler, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ which aims to deliver amazingly fast compiles (e.g. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ about 3x faster than GCC when compiling Objective-C \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ code in a debug configuration), extremely useful error \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and warning messages and to provide a platform for \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ building great source level tools. The included Clang \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Static Analyzer is a tool that automatically finds bugs in \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ your code, and is a great example of the sort of tool \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that can be built using the Clang frontend as a \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ library to parse C/C++ code.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:clang_select port:cctools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.group clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.file ${filespath}/mp-${subport}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_PROJECTS="clang\;clang-tools-extra\;compiler-rt\;libcxx\;libcxxabi\;lld\;mlir" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLIBCXX_ENABLE_SHARED=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLIBCXX_INSTALL_LIBRARY=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #-DLLVM_ENABLE_RUNTIMES="libcxx\;libcxxabi"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # we have to run the destroot like this, because individual targets for each of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # components we want to install are not available; we want "everything but llvm"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/tools/clang && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/tools/lld && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/projects/compiler-rt && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/projects/libcxx && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/projects/libcxxabi && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${subport} eq "flang-${llvm_version}" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ homepage https://flang.llvm.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description LLVM Fortran compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_PROJECTS="clang\;flang\;compiler-rt\;mlir" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLIBCXX_ENABLE_SHARED=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLIBCXX_INSTALL_LIBRARY=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:clang-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # we have to run the destroot like this, because individual targets for each of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # components we want to install are not available; we want "everything but llvm"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cd ${destroot.dir}/tools/flang && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
</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;'>+ notes-append {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This version of flang passes off to another fortran compiler to do the actual compiling.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ At present, you may need to set the desired fortran compiler with an ENV VAR if\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the default gfortran is not found on PATH.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ For example: F18_FC=gfortran-mp-11 flang-mp-13 hello.f90 -o hello.bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ See https://github.com/llvm/llvm-project/blob/master/flang/docs/ReleaseNotes.md
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${subport} eq "clang-${llvm_version}" ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${subport} eq "mlir-${llvm_version}" ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${subport} eq "flang-${llvm_version}" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # temporarily restrict to newer systems until older systems can be rigorously vetted
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.platform} eq "darwin" && ${os.major} <= 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ known_fail yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "${subport} is not supported on Darwin ${os.major} at present."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error {unsupported platform}
</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;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${subport} eq "clang-${llvm_version}" || ${subport} eq "flang-${llvm_version}" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libxml2 port:libomp port:llvm-${llvm_version} port:mlir-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:ld64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_skip_archcheck-append ld64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # CMAKE_LINKER is used to determine the value for HOST_LINK_VERSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_LINKER=${prefix}/bin/ld \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCLANG_INCLUDE_TESTS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCLANG_ENABLE_STATIC_ANALYZER=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCLANG_ENABLE_ARCMT=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DDARWIN_PREFER_PUBLIC_SDK=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_BUILD_RUNTIME=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} <= 18} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # on systems that might build i386, we need atomic builtins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/58712
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
</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;'>+ if {${os.major} <= 14} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # compiler-rt does a broad search for an SDK it likes, but this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # search fails on older systems that don't have a MacOSX.sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # TODO: apply this always to all systems?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${configure.sdkroot} eq ""} {set configure.sdkroot "/"}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DDARWIN_osx_SYSROOT="${configure.sdkroot}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # sanitizers in compiler_rt fail to build on older systems
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # might be fixable with the use of newer SDK and/or effort if motivated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # all three toggles are needed to force them off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCOMPILER_RT_BUILD_SANITIZERS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCOMPILER_RT_BUILD_XRAY=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
</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;'>+ if {${os.major} <= 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # xpc.h available 10.7 but doesn't support nullable features
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCLANGD_BUILD_XPC=OFF
</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;'>+ if {${os.major} <= 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # avoid need for thread_local_storage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCLANG_ENABLE_CLANGD=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLVM_ENABLE_BACKTRACES=OFF
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq "lldb-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ homepage https://lldb.llvm.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description the LLVM debugger
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description lldb is the "LLVM native" debugger.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libedit port:libffi port:ncurses path:lib/libxar.dylib:xar port:zlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:llvm-${llvm_version} port:clang-${llvm_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:swig-python port:doxygen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # error: use of undeclared identifier 'CPU_SUBTYPE_ARM64E
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.platform} eq "darwin" && ${os.major} <= 17} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see Note 1 below
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ known_fail yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "${subport} is not supported on Darwin ${os.major} at present."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error {unsupported platform}
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLDB_CODESIGN_IDENTITY=- \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DLLDB_ENABLE_LUA=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set worksrcpath ${workpath}/${distname}/lldb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-activate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Please follow the instructions at https://lldb.llvm.org/resources/build.html#code-signing-on-macos and then codesign lldb-server with:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 13} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " sudo codesign --force --deep --preserve-metadata=identifier,entitlements,resource-rules,requirements,flags,team-identifier --sign <identity> ${sub_prefix}/bin/lldb-server"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " sudo codesign --force --deep --preserve-metadata=identifier,entitlements,resource-rules,requirements --sign <identity> ${sub_prefix}/bin/lldb-server"
</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;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant tests description {Enable building of test code} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_test-append port:py39-psutil
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DLLVM_INCLUDE_TESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.target check
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.target check-all
</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;'>+ if {${subport} eq "lldb-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "running the test suite on ${subport} is not supported on this os version at present."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error {unsupported platform}
</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;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # remove the clang symlink and replace it with the actual binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}${sub_prefix}/bin/clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${destroot}${sub_prefix}/bin/clang-${llvm_version} ${destroot}${sub_prefix}/bin/clang
</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;'>+ # generate a versioned wrapper script for each file in the bin directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach bin [glob ${destroot}${sub_prefix}/bin/*] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bin_filename [string map "${sub_prefix} ${prefix}" ${bin}]-${suffix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exec_path [string map "${destroot}${sub_prefix} ${sub_prefix}" ${bin}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/54985
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.platform} eq "darwin" && [vercmp ${xcodeversion} 4.6] < 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 "${filespath}/llvm-bin-compat" "${bin_filename}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 "${filespath}/llvm-bin" "${bin_filename}"
</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;'>+ reinplace "s:EXEC_PATH:${exec_path}:" "${bin_filename}"
</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;'>+ if {${subport} eq "llvm-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://llvm.org/bugs/show_bug.cgi?id=19465
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s LLVMPolly.so ${destroot}${sub_prefix}/lib/LLVMPolly.dylib
</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;'>+ if {${subport} eq "flang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # fix errant permissions on the flang binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "chmod 755 ${destroot}${sub_prefix}/bin/flang"
</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;'>+ if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # fix the cmake scripts to point to the versioned files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|/bin/clang-${llvm_version}|/bin/clang|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${destroot}${sub_prefix}/lib/cmake/clang/ClangTargets-release.cmake"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/33207
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
</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;'>+ if {${subport} eq "lldb-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}${prefix}/bin/debugserver-${suffix}
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant analyzer description {Install clang static analyzer} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # these have to be switched on or off together
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DCLANG_ENABLE_STATIC_ANALYZER=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCLANG_ENABLE_STATIC_ANALYZER=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DCLANG_ENABLE_ARCMT=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCLANG_ENABLE_ARCMT=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:perl5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|/usr/bin/env perl|${prefix}/bin/perl5|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/scan-build/libexec/ccc-analyzer \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/scan-build/libexec/c++-analyzer \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/tools/scan-build/bin/scan-build
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Avoid requiring a bootstrap version of perl5 on 10.6.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +analyzer
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${cxx_stdlib} eq "libc++" && ${os.major} < 13 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant defaultlibcxx description {default to -stdlib=libc++ if not otherwise specified} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # on systems older than darwin 13, if macports.conf is configured to stdlib=libc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # then make that the default if not otherwise specified. This matches the behaviour of newer systems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0018-10.6-and-less-clang-default-to-libc-on-all-darwin-sy.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +defaultlibcxx
</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;'>+ variant libstdcxx description {-stdlib=macports-libstdc++ searches for MacPorts libstdc++} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0005-clang-support-macports-libstdcxx.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_GCC_INCLUDE_DIR@@|${prefix}/include/gcc/c++|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Lex/InitHeaderSearch.cpp \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_HOST_NAME@@|${build_arch}-apple-darwin${os.major}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_libstdc++@@|${prefix}/lib/libgcc/libstdc++.6.dylib|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # GCC was built for ${build_arch}-apple-darwin${os.major}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if GCC was also built universal, it has an extra include directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if ${build_arch} is 32-bit, there is an extra 64-bit subdirectory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if ${build_arch} is 64-bit, there is an extra 32-bit subdirectory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MacPorts GCC can not compile across platforms
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch ${build_arch} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x86_64 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc64 "ppc64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_i386 "i386"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_x86_64 ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ i386 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc64 "ppc64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_i386 ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_x86_64 "x86_64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ppc64 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc "ppc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc64 ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_i386 ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_x86_64 "x86_64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ppc {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_ppc64 "ppc64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_i386 ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set gcc_subdirectory_x86_64 "x86_64"
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_GCC_SUBDIRECTORY_x86_64@@|${gcc_subdirectory_x86_64}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_GCC_SUBDIRECTORY_i386@@|${gcc_subdirectory_i386}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_GCC_SUBDIRECTORY_ppc64@@|${gcc_subdirectory_ppc64}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@MACPORTS_GCC_SUBDIRECTORY_ppc@@|${gcc_subdirectory_ppc}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${patch.dir}/clang/lib/Driver/ToolChains/Darwin.cpp
</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;'>+ # at present, only the non-arm archs can use this variant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build_arch} in "x86_64 i386 ppc64 ppc"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +libstdcxx
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url https://github.com/llvm/llvm-project/tags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex llvmorg-(${llvm_version}.\[\\d.\]+).tar.gz
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0001-MacPorts-only-clang-use-MP-omp-locations.patch b/lang/llvm-14/files/0001-MacPorts-only-clang-use-MP-omp-locations.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..99509d2e13d
</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/0001-MacPorts-only-clang-use-MP-omp-locations.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,50 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From e27d02d4c95a48cfa3aa9f7c0f3d6dd4f45e4f22 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 13:07:20 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 01/24] MacPorts-only: clang use MP omp locations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+look in ${prefix}/lib/libomp for omp libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* this patch requires post-patch reinplace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChains/Clang.cpp | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChains/CommonArgs.cpp | 6 ++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 8 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1976b48e0f6a..981f35e36a0e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Clang.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Clang.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5463,6 +5463,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_OMP:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_IOMP5:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Clang can generate useful OpenMP code for these two runtime libraries.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Automatically find MacPorts' omp.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-I@@PREFIX@@/include/libomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-fopenmp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // If no option regarding the use of TLS in OpenMP codegeneration is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bcaea71dca94..a88833055be7 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -668,12 +668,18 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (RTKind) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_OMP:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Automatically find MacPorts' libomp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-lomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_GOMP:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Automatically find MacPorts' libomp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-lgomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_IOMP5:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Automatically find MacPorts' libomp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-liomp5");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case Driver::OMPRT_Unknown:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0002-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch b/lang/llvm-14/files/0002-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..1951ea7d57c
</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/0002-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3e8e190eecc3..54745d017b6f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -292,12 +292,14 @@ bool AsmPrinter::doInitialization(Module &M) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // alternative is duplicated code in each of the target asm printers that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // use the directive, where it would need the same conditionalization
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // anyway.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const Triple &Target = TM.getTargetTriple();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Triple TVT(M.getDarwinTargetVariantTriple());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- OutStreamer->emitVersionForTarget(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (MAI->useIntegratedAssembler()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const Triple &Target = TM.getTargetTriple();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Triple TVT(M.getDarwinTargetVariantTriple());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OutStreamer->emitVersionForTarget(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Target, M.getSDKVersion(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ M.getDarwinTargetVariantTriple().empty() ? nullptr : &TVT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ M.getDarwinTargetVariantSDKVersion());
</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;'>+ // Allow the target to emit any magic that it wants at the start of the file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ emitStartOfAsmFile(M);
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0003-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch b/lang/llvm-14/files/0003-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7241a2f2fc7
</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/0003-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,82 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 898f186abe78b972d294949c260b279f76b32a2b Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:14:25 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 03/24] MacPorts Only: Prepare clang-format for replacement
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with absolute path
</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;'>+ clang/tools/clang-format/clang-format-bbedit.applescript | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/tools/clang-format/clang-format-diff.py | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/tools/clang-format/clang-format-sublime.py | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/tools/clang-format/clang-format.el | 3 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/tools/clang-format/clang-format.py | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5 files changed, 5 insertions(+), 6 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/clang-format/clang-format-bbedit.applescript b/clang/tools/clang-format/clang-format-bbedit.applescript
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index fa88fe900480..eb09448be561 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/clang-format/clang-format-bbedit.applescript
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/clang-format/clang-format-bbedit.applescript
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15,7 +15,7 @@ tell application "BBEdit"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ end tell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set filePath to urlToPOSIXPath(fileURL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set newContents to do shell script "/path/to/clang-format -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set newContents to do shell script "@CLANG_FORMAT_PATH@ -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tell application "BBEdit"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -- "set contents of text document 1 to newContents" scrolls to the bottom while
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1f6ff0fe295f..8bab1b77c0c4 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/clang-format/clang-format-diff.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/clang-format/clang-format-diff.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -63,6 +63,6 @@ def main():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'fallback in case clang-format is invoked with'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '-style=file, but can not find the .clang-format'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'file to use.')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- parser.add_argument('-binary', default='clang-format',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parser.add_argument('-binary', default='@CLANG_FORMAT_PATH@',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ help='location of binary to use for clang-format')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ args = parser.parse_args()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/clang-format/clang-format-sublime.py b/clang/tools/clang-format/clang-format-sublime.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 20c867092ef5..ae823c1d05b6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/clang-format/clang-format-sublime.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/clang-format/clang-format-sublime.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,7 +18,7 @@ import sublime_plugin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import subprocess
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Change this to the full path if clang-format is not on the path.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-binary = 'clang-format'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++binary = '@CLANG_FORMAT_PATH@'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Change this to format according to other formatting styles. See the output of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # 'clang-format --help' for a list of supported styles. The default looks for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/clang-format/clang-format.el b/clang/tools/clang-format/clang-format.el
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 768acb3a5d0d..e702bc6af4db 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/clang-format/clang-format.el
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/clang-format/clang-format.el
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -37,8 +37,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :group 'tools)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defcustom clang-format-executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (or (executable-find "clang-format")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "clang-format")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "@CLANG_FORMAT_PATH@"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Location of the clang-format executable.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ A string containing the name or the full path of the executable."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 76fedb648147..9cb9825cbe5d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/clang-format/clang-format.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/clang-format/clang-format.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -48,7 +48,7 @@ import vim
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set g:clang_format_path to the path to clang-format if it is not on the path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Change this to the full path if clang-format is not on the path.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-binary = 'clang-format'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++binary = '@CLANG_FORMAT_PATH@'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if vim.eval('exists("g:clang_format_path")') == "1":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ binary = vim.eval('g:clang_format_path')
</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;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0004-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch b/lang/llvm-14/files/0004-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a6c21b19565
</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/0004-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 6ff25e20ec478fcb76148c062beef0ca8d88f897 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:15:35 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 04/24] MacPorts Only: Fix name of scan-view executable inside
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ scan-build
</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;'>+ clang/tools/scan-build/bin/scan-build | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/tools/scan-build/bin/scan-build b/clang/tools/scan-build/bin/scan-build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 645f5507b6fa..2eecc3b9a1dd 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/tools/scan-build/bin/scan-build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/tools/scan-build/bin/scan-build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -969,6 +969,8 @@ sub Finalize {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ($Options{ViewResults} and -r "$Options{OutputDir}/index.html") {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Diag "Viewing analysis results in '$Options{OutputDir}' using scan-view.\n";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my $ScanView = Cwd::realpath("$RealBin/scan-view");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/bin/scan-view"); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../scan-view/scan-view"); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (! -x $ScanView) { $ScanView = "scan-view"; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../../scan-view/bin/scan-view"); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (! -x $ScanView) { $ScanView = `which scan-view`; chomp $ScanView; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0005-clang-support-macports-libstdcxx.patch b/lang/llvm-14/files/0005-clang-support-macports-libstdcxx.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..4b581642180
</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/0005-clang-support-macports-libstdcxx.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,202 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 4e850191efa6659de85a4ff9be7c896cfb0bb1ec Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:28:40 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 05/24] clang: support macports-libstdcxx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+requires reinplace of search paths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/include/clang/Driver/ToolChain.h | 3 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/include/clang/Lex/HeaderSearchOptions.h | 3 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChain.cpp | 3 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChains/Darwin.cpp | 40 ++++++++++++++-----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChains/Hexagon.cpp | 2 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Frontend/CompilerInvocation.cpp.rej | 21 ++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Frontend/InitHeaderSearch.cpp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 7 files changed, 63 insertions(+), 11 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create mode 100644 clang/lib/Frontend/CompilerInvocation.cpp.rej
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 28c37a44e1eb..78fcaec7bfb0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/include/clang/Driver/ToolChain.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/include/clang/Driver/ToolChain.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -94,7 +94,8 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enum CXXStdlibType {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CST_Libcxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CST_Libstdcxx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CST_Libstdcxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CST_MacPortsLibstdcxx
</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;'>+ enum RuntimeLibType {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/include/clang/Lex/HeaderSearchOptions.h b/clang/include/clang/Lex/HeaderSearchOptions.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 42f3cff8c57a..97a01793c12c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/include/clang/Lex/HeaderSearchOptions.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/include/clang/Lex/HeaderSearchOptions.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -189,6 +189,9 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /// Use libc++ instead of the default libstdc++.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned UseLibcxx : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /// Use MacPorts libstdc++ instead of default system libstdc++.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ unsigned UseMacPortsLibstdcxx : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /// Whether header search information should be output as for -v.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned Verbose : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b2ddef141a75..6160843b6885 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChain.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChain.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -826,7 +826,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cxxStdlibType = ToolChain::CST_Libcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else if (LibName == "libstdc++")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cxxStdlibType = ToolChain::CST_Libstdcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else if (LibName == "macports-libstdc++")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cxxStdlibType = ToolChain::CST_MacPortsLibstdcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else if (LibName == "platform")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cxxStdlibType = GetDefaultCXXStdlibType();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1017,6 +1019,7 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ToolChain::CST_Libstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ToolChain::CST_MacPortsLibstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-lstdc++");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</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 eb7bd4aec898..daa8e520e404 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2039,8 +2039,9 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CXXStdlibType Type = GetCXXStdlibType(DriverArgs);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (GetCXXStdlibType(DriverArgs)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (Type) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ToolChain::CST_Libcxx: {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // On Darwin, libc++ can be installed in one of the following two places:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // 1. Alongside the compiler in <install>/include/c++/v1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2082,6 +2083,7 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</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;'>+ case ToolChain::CST_Libstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ToolChain::CST_MacPortsLibstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ llvm::SmallString<128> UsrIncludeCxx = Sysroot;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ llvm::sys::path::append(UsrIncludeCxx, "usr", "include", "c++");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2092,10 +2094,17 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case llvm::Triple::ppc:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case llvm::Triple::ppc64:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IsBaseFound = AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "4.2.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "powerpc-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- arch == llvm::Triple::ppc64 ? "ppc64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (Type==ToolChain::CST_MacPortsLibstdcxx) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, llvm::StringRef("@@MACPORTS_GCC_INCLUDE_DIR@@"),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "@@MACPORTS_HOST_NAME@@",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch == llvm::Triple::ppc64 ? "@@MACPORTS_GCC_SUBDIRECTORY_ppc64@@" : "@@MACPORTS_GCC_SUBDIRECTORY_ppc@@");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "4.2.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "powerpc-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch == llvm::Triple::ppc64 ? "ppc64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "4.0.0", "powerpc-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch == llvm::Triple::ppc64 ? "ppc64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2103,10 +2112,17 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case llvm::Triple::x86:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case llvm::Triple::x86_64:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IsBaseFound = AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "4.2.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "i686-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- arch == llvm::Triple::x86_64 ? "x86_64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (Type==ToolChain::CST_MacPortsLibstdcxx) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound = AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, llvm::StringRef("@@MACPORTS_GCC_INCLUDE_DIR@@"),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "@@MACPORTS_HOST_NAME@@",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch == llvm::Triple::x86_64 ? "@@MACPORTS_GCC_SUBDIRECTORY_x86_64@@" : "@@MACPORTS_GCC_SUBDIRECTORY_i386@@");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "4.2.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "i686-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch == llvm::Triple::x86_64 ? "x86_64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "4.0.0", "i686-apple-darwin8",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2149,6 +2165,12 @@ void DarwinClang::AddCXXStdlibLibArgs(const ArgList &Args,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ToolChain::CST_Libstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ToolChain::CST_MacPortsLibstdcxx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (Type==ToolChain::CST_MacPortsLibstdcxx && getVFS().exists("@@MACPORTS_libstdc++@@")) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("@@MACPORTS_libstdc++@@");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</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;'>+ // Unfortunately, -lstdc++ doesn't always exist in the standard search path;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // it was previously found in the gcc lib dir. However, for all the Darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // platforms we care about it was -lstdc++.6, so we search for that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index fb54f73bcd4c..0260a32096af 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -643,6 +643,8 @@ HexagonToolChain::GetCXXStdlibType(const ArgList &Args) const {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ToolChain::CST_Libstdcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ StringRef Value = A->getValue();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (Value == "macports-libstdc++")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ToolChain::CST_MacPortsLibstdcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (Value != "libstdc++" && Value != "libc++")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getDriver().Diag(diag::err_drv_invalid_stdlib_name) << A->getAsString(Args);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Frontend/CompilerInvocation.cpp.rej b/clang/lib/Frontend/CompilerInvocation.cpp.rej
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 000000000000..227618c333c4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Frontend/CompilerInvocation.cpp.rej
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++***************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*** 2939,2946 ****
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #include "clang/Driver/Options.inc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #undef HEADER_SEARCH_OPTION_WITH_MARSHALLING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++- if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Opts.UseLibcxx = (strcmp(A->getValue(), "libc++") == 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Canonicalize -fmodules-cache-path before storing it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SmallString<128> P(Args.getLastArgValue(OPT_fmodules_cache_path));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--- 2939,2948 ----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #include "clang/Driver/Options.inc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #undef HEADER_SEARCH_OPTION_WITH_MARSHALLING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Opts.UseLibcxx = (strcmp(A->getValue(), "libc++") == 0);
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ Opts.UseMacPortsLibstdcxx = (strcmp(A->getValue(), "macports-libstdc++") == 0);
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Canonicalize -fmodules-cache-path before storing it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SmallString<128> P(Args.getLastArgValue(OPT_fmodules_cache_path));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bc31445d6d08..abc3750edec0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Lex/InitHeaderSearch.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Lex/InitHeaderSearch.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,7 +108,7 @@ static bool CanPrefixSysroot(StringRef Path) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(_WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return !Path.empty() && llvm::sys::path::is_separator(Path[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return llvm::sys::path::is_absolute(Path);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return llvm::sys::path::is_absolute(Path) && Path.find("@@MACPORTS_GCC_INCLUDE_DIR@@")!=0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</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;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0006-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch b/lang/llvm-14/files/0006-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c932c4a4894
</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/0006-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,32 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 42707294da2789a755eedcd1af1a7fe0bc419925 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:13:00 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 06/24] Define EXC_MASK_CRASH and MACH_EXCEPTION_CODES if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ they're not defined in the SDK
</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;'>+ llvm/lib/Support/Unix/Signals.inc | 9 +++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 9 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3d7b5d2fe5aa..7280003dacfb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/lib/Support/Unix/Signals.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/lib/Support/Unix/Signals.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -642,6 +642,15 @@ void llvm::sys::PrintStackTraceOnErrorSignal(StringRef Argv0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AddSignalHandler(PrintStackTraceSignalHandler, nullptr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(__APPLE__) && ENABLE_CRASH_OVERRIDES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* These aren't defined in the 10.4 SDK, so provide them here */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef EXC_MASK_CRASH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define EXC_MASK_CRASH 0x400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef MACH_EXCEPTION_CODES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define MACH_EXCEPTION_CODES 0x80000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Environment variable to disable any kind of crash dialog.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (DisableCrashReporting || getenv("LLVM_DISABLE_CRASH_REPORT")) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mach_port_t self = mach_task_self();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0007-Threading-Only-call-pthread_setname_np-if-we-have-it.patch b/lang/llvm-14/files/0007-Threading-Only-call-pthread_setname_np-if-we-have-it.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7fb3372b58e
</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/0007-Threading-Only-call-pthread_setname_np-if-we-have-it.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From af4b8f8987248e442faaad339261332e05e254b8 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:21:10 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 07/24] Threading: Only call pthread_setname_np() if we have it
</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;'>+ llvm/lib/Support/Unix/Threading.inc | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/lib/Support/Unix/Threading.inc b/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 667d023fc134..8162c60b2cdd 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -176,8 +176,10 @@ void llvm::set_thread_name(const Twine &Name) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ::pthread_setname_np(::pthread_self(), "%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const_cast<char *>(NameStr.data()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_PTHREAD_SETNAME_NP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ::pthread_setname_np(NameStr.data());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</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;'>+ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0008-Threading-Only-call-setpriority-PRIO_DARWIN_THREAD-0.patch b/lang/llvm-14/files/0008-Threading-Only-call-setpriority-PRIO_DARWIN_THREAD-0.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..baded5d63e2
</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/0008-Threading-Only-call-setpriority-PRIO_DARWIN_THREAD-0.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 718ec394030ca2da3973e0135d073e000b366848 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:22:44 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 08/24] Threading: Only call setpriority(PRIO_DARWIN_THREAD, 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PRIO_DARWIN_BG) if it is available
</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;'>+ llvm/lib/Support/Unix/Threading.inc | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/lib/Support/Unix/Threading.inc b/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 8162c60b2cdd..e0564c24b7f2 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/lib/Support/Unix/Threading.inc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -259,7 +259,7 @@ SetThreadPriorityResult llvm::set_thread_priority(ThreadPriority Priority) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &priority)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ? SetThreadPriorityResult::SUCCESS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : SetThreadPriorityResult::FAILURE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__APPLE__) && defined(PRIO_DARWIN_THREAD) && defined(PRIO_DARWIN_BG)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getpriority.2.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // When setting a thread into background state the scheduling priority is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // to lowest value, disk and network IO are throttled. Network IO will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0009-lib-Support-Unix-Path.inc-define-COPYFILE_CLONE-if-n.patch b/lang/llvm-14/files/0009-lib-Support-Unix-Path.inc-define-COPYFILE_CLONE-if-n.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..de4552037a5
</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/0009-lib-Support-Unix-Path.inc-define-COPYFILE_CLONE-if-n.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,14 @@
</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 788460d657fe..812373236ada 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;'>+@@ -39,6 +39,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <mach-o/dyld.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/attr.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <copyfile.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef COPYFILE_CLONE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define COPYFILE_CLONE (1<<24)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if __has_include(<sys/clonefile.h>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/clonefile.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0010-compiler-rt-cmake-config-ix.cmake-was-Leopard-No-ASA.patch b/lang/llvm-14/files/0010-compiler-rt-cmake-config-ix.cmake-was-Leopard-No-ASA.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..b8fe8378c00
</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/0010-compiler-rt-cmake-config-ix.cmake-was-Leopard-No-ASA.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 5b239286a37f4e3a0b8b843b1784acf6e4632a41 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:58:33 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 10/24] compiler-rt/cmake/config-ix.cmake was Leopard: No ASAN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+don't error parsing this script on < 10.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler-rt/cmake/config-ix.cmake | 3 ---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f81b8384cbd5..f4d47da7c4f4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/cmake/config-ix.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/cmake/config-ix.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -414,9 +414,6 @@ if(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(SANITIZER_MIN_OSX_VERSION ${DEFAULT_SANITIZER_MIN_OSX_VERSION})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER ${DEFAULT_SANITIZER_MIN_OSX_VERSION})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '${DEFAULT_SANITIZER_MIN_OSX_VERSION}' instead.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(SANITIZER_MIN_OSX_VERSION ${DEFAULT_SANITIZER_MIN_OSX_VERSION})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0011-Fix-missing-long-long-math-prototypes-when-using-the.patch b/lang/llvm-14/files/0011-Fix-missing-long-long-math-prototypes-when-using-the.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f3a875f0e7f
</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/0011-Fix-missing-long-long-math-prototypes-when-using-the.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,49 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 1040a210f53cc8a96f4e2c0bfc2b7ea53479955a Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:21:47 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 11/24] Fix missing long long math prototypes when using the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Snow Leopard SDK
</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;'>+ libcxx/include/math.h | 26 ++++++++++++++++++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 26 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/libcxx/include/math.h b/libcxx/include/math.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1603d5748e2d..d64e6a52ccd3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/libcxx/include/math.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/libcxx/include/math.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -299,6 +299,32 @@ long double truncl(long double x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include_next <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if __has_include(<Availability.h>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <Availability.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if __MAC_OS_X_VERSION_MAX_ALLOWED < 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define __APPLE_BAD_MATH_H 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define __APPLE_BAD_MATH_H 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define __APPLE_BAD_MATH_H 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if __APPLE_BAD_MATH_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* These prototypes are incorrectly omitted from <math.h> on Snow Leopard despite being available */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llrintl(long double);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llrint(double);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llrintf(float);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llroundl(long double);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llround(double);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extern long long int llroundf(float);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif // __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // We support including .h headers inside 'extern "C"' contexts, so switch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0012-compiler-rt-add-some-defs-missing-in-older-SDKs.patch b/lang/llvm-14/files/0012-compiler-rt-add-some-defs-missing-in-older-SDKs.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..316b85770ca
</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/0012-compiler-rt-add-some-defs-missing-in-older-SDKs.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,47 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 469281c821580ff8c89db236b35ef0a7c651633c Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:29:16 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 12/24] compiler-rt: add some defs missing in older SDKs
</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;'>+ compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp | 8 ++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp | 5 +++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 13 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a5bed658a446..b853462df3d2 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,6 +19,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/wait.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// add definition missing on older systems
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef POSIX_SPAWN_SETSIGMASK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define POSIX_SPAWN_SETSIGMASK 0x0008
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef POSIX_SPAWN_SETSIGDEF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define POSIX_SPAWN_SETSIGDEF 0x0004
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // There is no header for this on macOS so declare here
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern "C" char **environ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2b53d7d730d7..6950f8757dd0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -110,6 +110,11 @@ extern "C" int __munmap(void *, size_t) SANITIZER_WEAK_ATTRIBUTE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define VM_MEMORY_SANITIZER 99
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// From <sys/spawn.h> but not in some SDKs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef POSIX_SPAWN_CLOEXEC_DEFAULT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define POSIX_SPAWN_CLOEXEC_DEFAULT 0x4000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // XNU on Darwin provides a mmap flag that optimizes allocation/deallocation of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // giant memory regions (i.e. shadow memory regions).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define kXnuFastMmapFd 0x4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0013-clang-add-back-runtime-libraries-used-on-10.4-and-10.patch b/lang/llvm-14/files/0013-clang-add-back-runtime-libraries-used-on-10.4-and-10.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..822a17455fc
</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/0013-clang-add-back-runtime-libraries-used-on-10.4-and-10.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,39 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 5d31528f4eaeebf1918f573cf3c61810594b8fa9 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:44:35 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 13/24] clang: add back runtime libraries used on 10.4 and 10.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+removed in https://github.com/llvm/llvm-project/commit/3434ade2b7ca351b61522f7da4b55070d811b83f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+related, the following code used to add libclang_rt_10.4.a to Tiger, but this library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+is no longer built in the runtime library collections. If building for Tiger, it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+may be required to replace this library at some point.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The line below this, adding "builtins" adds libclang_rt.osx.a, does the second part of this.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+it may be easiest to just add Tiger functions to libclang_rt.osx.a directly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // if (isMacosxVersionLT(10, 5))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.10.4.a");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.osx.a");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Driver/ToolChains/Darwin.cpp | 6 ++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 6 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</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 daa8e520e404..da1d171ce859 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1334,6 +1334,12 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getTriple().getArch() != llvm::Triple::aarch64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CmdArgs.push_back("-lgcc_s.1");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (isTargetMacOS()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (isMacosxVersionLT(10, 5))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-lgcc_s.10.4");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else if (isMacosxVersionLT(10, 6))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CmdArgs.push_back("-lgcc_s.10.5");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AddLinkRuntimeLib(Args, CmdArgs, "builtins");
</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;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0014-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch b/lang/llvm-14/files/0014-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..0028c077951
</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/0014-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Headers/float.h b/clang/lib/Headers/float.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index c6a6cc08462d..d02531c466f4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Headers/float.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Headers/float.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -17,9 +17,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Also fall back on Darwin and AIX to allow additional definitions and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * implementation-defined values.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if (defined(__APPLE__) || defined(__MINGW32__) || defined(_MSC_VER) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- defined(_AIX)) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __STDC_HOSTED__ && __has_include_next(<float.h>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__APPLE__) && __has_include(<Availability.h>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <Availability.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if ((defined(__APPLE__) && __has_include(<Availability.h>) && (!defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300)) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ defined(__MINGW32__) || defined(_MSC_VER) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ defined(_AIX)) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ __STDC_HOSTED__ && __has_include_next(<float.h>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0015-Fixup-libstdc-header-search-paths-for-older-versions.patch b/lang/llvm-14/files/0015-Fixup-libstdc-header-search-paths-for-older-versions.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5b9949a2f87
</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/0015-Fixup-libstdc-header-search-paths-for-older-versions.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 272e5f29ac311ec138652e680a3b1400bad0a1fa Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:12:59 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 15/24] Fixup libstdc++ header search paths for older versions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of Mac OS X
</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;'>+ clang/lib/Driver/ToolChains/Darwin.cpp | 4 ++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</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 da1d171ce859..cef270cfc34a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2112,7 +2112,7 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "powerpc-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch == llvm::Triple::ppc64 ? "ppc64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "4.0.0", "powerpc-apple-darwin10",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "4.0.0", "powerpc-apple-darwin8",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch == llvm::Triple::ppc64 ? "ppc64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2131,7 +2131,7 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch == llvm::Triple::x86_64 ? "x86_64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "4.0.0", "i686-apple-darwin8",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch == llvm::Triple::x86_64 ? "x86_64" : "");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case llvm::Triple::arm:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0016-10.10-and-less-compiler-rt-find-macosx-sdk.patch b/lang/llvm-14/files/0016-10.10-and-less-compiler-rt-find-macosx-sdk.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..9da35c90a8f
</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/0016-10.10-and-less-compiler-rt-find-macosx-sdk.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,44 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From e7fe0d485d8b41d35410f3bec3683eba391a1917 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:17:07 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 16/24] 10.10 and less: compiler-rt find macosx sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if there is no sdk that responds to "macosx" use the CMAKE passed in deployment target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .../cmake/Modules/CompilerRTDarwinUtils.cmake | 14 +++++---------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 5 insertions(+), 9 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 456a8dcda59f..e9f6f577d626 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -69,15 +69,6 @@ function(find_darwin_sdk_version var sdk_name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ERROR_FILE /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if(NOT result_process EQUAL 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message(FATAL_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "Failed to determine SDK version for \"${sdk_name}\" SDK")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Check reported version looks sane.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message(FATAL_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "Reported SDK version \"${var_internal}\" does not look like a version")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(${var} ${var_internal} PARENT_SCOPE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endfunction()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -128,6 +119,11 @@ function(darwin_test_archs os valid_archs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # binaries.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ("${os}" STREQUAL "osx")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ find_darwin_sdk_version(macosx_sdk_version "macosx")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # if there is no sdk that responds to "macosx" use the CMAKE passed in deployment target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if(NOT macosx_sdk_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ message(WARNING "Could not determine MacOSX SDK Version, trying CMAKE_OSX_DEPLOYMENT_TARGET")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(macosx_sdk_version CMAKE_OSX_DEPLOYMENT_TARGET)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message(STATUS "Disabling i386 slice for ${valid_archs}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list(REMOVE_ITEM archs "i386")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0017-10.6-and-less-libcxx-work-around-no-reexported_symbo.patch b/lang/llvm-14/files/0017-10.6-and-less-libcxx-work-around-no-reexported_symbo.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..64696ae573b
</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/0017-10.6-and-less-libcxx-work-around-no-reexported_symbo.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,43 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From f1342ea845c1126f17dc6a8e73244c645e80d20f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:58:11 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 17/24] 10.6 and less: libcxx work around no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reexported_symbols_list before 10.7
</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;'>+ libcxx/src/CMakeLists.txt | 13 +++++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 13 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 9965104cb5b2..3d64f728016f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/libcxx/src/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/libcxx/src/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -222,6 +222,8 @@ if (LIBCXX_ENABLE_SHARED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# MacPorts: work around no OS support for reexported_symbols_list before 10.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if (CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.7)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target_link_libraries(cxx_shared PRIVATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++unexp.exp"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -231,6 +233,17 @@ if (LIBCXX_ENABLE_SHARED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target_link_libraries(cxx_shared PRIVATE $<TARGET_NAME_IF_EXISTS:cxxabi-reexports>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_link_libraries(cxx_shared PRIVATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++unexp.exp"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_link_libraries(cxx_shared PRIVATE $<TARGET_NAME_IF_EXISTS:cxxabi-reexports>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Generate a linker script in place of a libc++.so symlink.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0018-10.6-and-less-clang-default-to-libc-on-all-darwin-sy.patch b/lang/llvm-14/files/0018-10.6-and-less-clang-default-to-libc-on-all-darwin-sy.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..57bd0690b60
</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/0018-10.6-and-less-clang-default-to-libc-on-all-darwin-sy.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From facdcc56815e93a378a82b57a554f75a9a54c8d4 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 21:19:46 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 18/24] 10.6 and less: clang default to libc++ on all darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ systems
</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;'>+ clang/lib/Driver/ToolChains/Darwin.cpp | 4 ++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</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 cef270cfc34a..3751a6a3986f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Darwin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -823,8 +823,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool MachO::HasNativeLLVMSupport() const { return true; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ToolChain::CXXStdlibType Darwin::GetDefaultCXXStdlibType() const {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- // Default to use libc++ on OS X 10.9+ and iOS 7+.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((isTargetMacOSBased() && !isMacosxVersionLT(10, 9)) ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Default to use libc++ on OS X 10.4+ and iOS 7+.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((isTargetMacOSBased() && !isMacosxVersionLT(10, 4)) ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (isTargetIOSBased() && !isIPhoneOSVersionLT(7, 0)) ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ isTargetWatchOSBased())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ToolChain::CST_Libcxx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0019-10.6-and-less-use-emulated-TLS-before-10.7.patch b/lang/llvm-14/files/0019-10.6-and-less-use-emulated-TLS-before-10.7.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..9b84a6e2bde
</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/0019-10.6-and-less-use-emulated-TLS-before-10.7.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,58 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 63501ee748110f8bd9c54859992406b7c1089f83 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:30:32 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 19/24] 10.6 and less: use emulated TLS before 10.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+enable TLS on 10.4 and up
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ItaniumCXXABI.cpp: call correct c++ TLS exit function
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+on 10.7+, we use the system TLS and _tlv_atexit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+on < 10.7, we use emulated TLS and __cxa_thread_atexit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/Basic/Targets/OSTargets.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang/lib/CodeGen/ItaniumCXXABI.cpp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ llvm/include/llvm/ADT/Triple.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 3 files changed, 3 insertions(+), 3 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 67fa1a537fea..2f2ce1ccafde 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Basic/Targets/OSTargets.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Basic/Targets/OSTargets.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -92,7 +92,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ this->TLSSupported = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (Triple.isMacOSX())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ this->TLSSupported = !Triple.isMacOSXVersionLT(10, 4);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else if (Triple.isiOS()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // 32-bit simulator from 10 onwards.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 50fb30a95cbb..1df40230e8f1 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2487,7 +2487,7 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const char *Name = "__cxa_atexit";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (TLS) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const llvm::Triple &T = CGF.getTarget().getTriple();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Name = T.isOSDarwin() ? "_tlv_atexit" : "__cxa_thread_atexit";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Name = (T.isOSDarwin() && !T.isMacOSXVersionLT(10, 7)) ? "_tlv_atexit" : "__cxa_thread_atexit";
</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;'>+ // We're assuming that the destructor function is something we can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/include/llvm/ADT/Triple.h b/llvm/include/llvm/ADT/Triple.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index eed315c929ad..649b35f94307 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/include/llvm/ADT/Triple.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/include/llvm/ADT/Triple.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -809,7 +809,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /// Tests whether the target uses emulated TLS as default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool hasDefaultEmulatedTLS() const {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment() || isMacOSXVersionLT(10, 7);
</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;'>+ /// Tests whether the target uses -data-sections as default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0020-10.6-and-less-work-around-no-directory-watcher-befor.patch b/lang/llvm-14/files/0020-10.6-and-less-work-around-no-directory-watcher-befor.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..23796f9b30a
</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/0020-10.6-and-less-work-around-no-directory-watcher-befor.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 8931e4b417d14e257b7afe0ec00cb5ba56d3208f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:46:27 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 20/24] 10.6 and less work around no directory watcher before
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 10.7
</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;'>+ clang/lib/DirectoryWatcher/CMakeLists.txt | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/DirectoryWatcher/CMakeLists.txt b/clang/lib/DirectoryWatcher/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5a8796982113..d826529026fb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/DirectoryWatcher/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/DirectoryWatcher/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS support)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(DIRECTORY_WATCHER_SOURCES DirectoryScanner.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(DIRECTORY_WATCHER_LINK_LIBS "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if(APPLE AND (CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.7))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_include_files("CoreServices/CoreServices.h" HAVE_CORESERVICES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(HAVE_CORESERVICES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list(APPEND DIRECTORY_WATCHER_SOURCES mac/DirectoryWatcher-mac.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0021-10.6-and-less-libcxx-disable-Availability-tests.patch b/lang/llvm-14/files/0021-10.6-and-less-libcxx-disable-Availability-tests.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f3077e25a24
</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/0021-10.6-and-less-libcxx-disable-Availability-tests.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 62174518a09fd4c8375abc79e27acf22b344c13b Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 13:20:14 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 21/24] 10.6 and less: libcxx disable Availability tests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+the libc++.dylib installed by MacPorts has different features than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+the OS default-installed version, so the Availability tests are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+not valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Currently this is done by default on SnowLeopard and earlier.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+note this patch is disappearing. The new way to specify this will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+with a Cmake define
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libcxx/include/__config | 3 +++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/libcxx/include/__config b/libcxx/include/__config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a3838c89e8e1..685827372fd5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/libcxx/include/__config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/libcxx/include/__config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,6 +10,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef _LIBCPP_CONFIG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define _LIBCPP_CONFIG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// for MacPorts, our installed libcxx does not require Apple system Availability tests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _LIBCPP_DISABLE_AVAILABILITY
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(_MSC_VER) && !defined(__clang__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0022-10.5-and-less-default-to-fno-blocks.patch b/lang/llvm-14/files/0022-10.5-and-less-default-to-fno-blocks.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..b7f34605708
</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/0022-10.5-and-less-default-to-fno-blocks.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,24 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From b1b759b8b3e7eace0c286d512df359f9995eb490 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:56:51 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 22/24] 10.5 and less: default to -fno-blocks
</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;'>+ clang/lib/Driver/ToolChains/Darwin.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 25c63fed922a..0b1ecc7054c6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/clang/lib/Driver/ToolChains/Darwin.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/Driver/ToolChains/Darwin.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -217,7 +217,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool IsBlocksDefault() const override {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Always allow blocks on Apple; users interested in versioning are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // expected to use /usr/include/Block.h.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool IsIntegratedAssemblerDefault() const override {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Default integrated assembler to on for Apple's MachO targets.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0023-10.5-and-less-use-older-cfname-and-fix-uuid-on-leopa.patch b/lang/llvm-14/files/0023-10.5-and-less-use-older-cfname-and-fix-uuid-on-leopa.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..ab0dc1e2ee8
</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/0023-10.5-and-less-use-older-cfname-and-fix-uuid-on-leopa.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,30 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From f0bf1d6eec7a92ea809c142f4d1718867be42d68 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sun, 16 May 2021 12:25:16 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 23/24] 10.5 and less: use older cfname and fix uuid on leopard
</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;'>+ llvm/tools/dsymutil/SymbolMap.cpp | 8 ++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 8 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/llvm/tools/dsymutil/SymbolMap.cpp b/llvm/tools/dsymutil/SymbolMap.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 07a54795a841..595eaa281b57 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/llvm/tools/dsymutil/SymbolMap.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/llvm/tools/dsymutil/SymbolMap.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -17,6 +17,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <CoreFoundation/CoreFoundation.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <uuid/uuid.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* declare a missing reference not found in SDK < 10.6 for function called below */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef char * uuid_string_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct __CFError * CFErrorRef;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CFPropertyListCreateWithStream(A,B,C,D,E,F) CFPropertyListCreateFromStream(A,B,C,D,E,F)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namespace llvm {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0024-10.5-and-less-compiler-rt-work-around-no-libdispatch.patch b/lang/llvm-14/files/0024-10.5-and-less-compiler-rt-work-around-no-libdispatch.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7076fe382aa
</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/0024-10.5-and-less-compiler-rt-work-around-no-libdispatch.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,64 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From ac50612f4448d329ff68bfc35f25161cb42c0510 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 17 May 2021 17:14:45 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 24/24] 10.5 and less: compiler-rt work around no libdispatch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ before 10.6
</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;'>+ compiler-rt/lib/builtins/os_version_check.c | 13 +++++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 13 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/builtins/os_version_check.c b/compiler-rt/lib/builtins/os_version_check.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d7194b99ae54..57a065b7da48 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/builtins/os_version_check.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/builtins/os_version_check.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,8 +13,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <TargetConditionals.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <dispatch/dispatch.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <dlfcn.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdint.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,8 +26,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // These three variables hold the host's OS version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int32_t GlobalMajor, GlobalMinor, GlobalSubminor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static dispatch_once_t DispatchOnceCounter;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static dispatch_once_t CompatibilityDispatchOnceCounter;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // _availability_version_check darwin API support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef uint32_t dyld_platform_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -247,8 +252,14 @@ static void initializeAvailabilityCheck(void *Unused) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // usable when linked with new compiler-rt.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int32_t __isOSVersionAtLeast(int32_t Major, int32_t Minor, int32_t Subminor) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Populate the global version variables, if they haven't already.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dispatch_once_f(&CompatibilityDispatchOnceCounter, NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compatibilityInitializeAvailabilityCheck);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* expensive procedure, only do once. GlobalMajor will not be 0 once run. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (GlobalMajor == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _initializeAvailabilityCheck(/*LoadPlist=*/true);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (Major < GlobalMajor)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -268,7 +279,9 @@ static inline uint32_t ConstructVersion(uint32_t Major, uint32_t Minor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int32_t __isPlatformVersionAtLeast(uint32_t Platform, uint32_t Major,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint32_t Minor, uint32_t Subminor) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dispatch_once_f(&DispatchOnceCounter, NULL, initializeAvailabilityCheck);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!AvailabilityVersionCheck) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return __isOSVersionAtLeast(Major, Minor, Subminor);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0025-lldb-add-defines-needed-for-older-SDKs.patch b/lang/llvm-14/files/0025-lldb-add-defines-needed-for-older-SDKs.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e9e1cc234a3
</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/0025-lldb-add-defines-needed-for-older-SDKs.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,55 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 745ebd5a9db4956328f42cf5a6d793cd28213a56 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sat, 5 Jun 2021 11:57:45 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 25/25] lldb: add defines needed for older SDKs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fixes build of lldb back to at least 10.12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lldb/tools/debugserver/source/DNB.h | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .../debugserver/source/MacOSX/MachProcess.mm | 16 ++++++++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 20 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lldb/tools/debugserver/source/DNB.h b/lldb/tools/debugserver/source/DNB.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 069c62dc41d8..edfd55dd8422 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lldb/tools/debugserver/source/DNB.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lldb/tools/debugserver/source/DNB.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define CPU_TYPE_ARM64_32 ((cpu_type_t)12 | 0x02000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef CPU_SUBTYPE_ARM64E
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CPU_SUBTYPE_ARM64E ((cpu_subtype_t) 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef bool (*DNBShouldCancelCallback)(void *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void DNBInitialize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1b962da8d02b..6c27212c6e49 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -47,6 +47,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "CFBundle.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "CFString.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef PLATFORM_MACOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PLATFORM_MACOS 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef PLATFORM_IOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PLATFORM_IOS 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef PLATFORM_TVOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PLATFORM_TVOS 3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef PLATFORM_WATCHOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PLATFORM_WATCHOS 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef PLATFORM_BRIDGEOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define PLATFORM_BRIDGEOS 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.21.1 (Apple Git-122.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/0100-define-target-os-osx.patch b/lang/llvm-14/files/0100-define-target-os-osx.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..939c6175655
</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/0100-define-target-os-osx.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;'>+--- a/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp 2021-10-26 12:21:35.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp 2021-10-26 12:25:47.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,6 +19,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ using namespace llvm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ using namespace clang;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef TARGET_OS_OSX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define TARGET_OS_OSX 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if TARGET_OS_OSX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void stopFSEventStream(FSEventStreamRef);
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/llvm-bin b/lang/llvm-14/files/llvm-bin
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..30a82697b74
</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/llvm-bin
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/bin/bash
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -x /usr/bin/xcrun ] ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exec /usr/bin/xcrun EXEC_PATH "${@}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exec EXEC_PATH "${@}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fi
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/llvm-bin-compat b/lang/llvm-14/files/llvm-bin-compat
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..b060c1a098d
</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/llvm-bin-compat
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,2 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/bin/sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+exec EXEC_PATH "${@}"
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-14/files/mp-clang-14 b/lang/llvm-14/files/mp-clang-14
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f3ecd376869
</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/mp-clang-14
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/c-index-test-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang++-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-format-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/scan-build-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/scan-view-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-apply-replacements-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-check-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-cl-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-query-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-rename-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/clang-tidy-mp-14
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</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;color:#808080;'>diff --git a/lang/llvm-14/files/mp-llvm-14 b/lang/llvm-14/files/mp-llvm-14
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..b0c681ae332
</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/mp-llvm-14
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,60 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/bugpoint-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llc-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/lli-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-ar-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-as-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-bcanalyzer-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-config-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-cov-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-diff-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-dis-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-dwarfdump-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-extract-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-link-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-mc-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-nm-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-objdump-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-ranlib-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-rtdyld-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-size-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-stress-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-symbolizer-mp-14
</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;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/opt-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-tblgen-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-readobj-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-profdata-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/dsymutil-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-cxxdump-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-c-test-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-dwp-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-lib-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-lto-mp-14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bin/llvm-split-mp-14
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</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;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span></pre><pre style='margin:0'>
</pre>