<pre style='margin:0'>
Ken (kencu) pushed a commit to branch llvmdevelfix
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/00fa5592e8ae4a85cb90279cb126716fd39c4dcd">https://github.com/macports/macports-ports/commit/00fa5592e8ae4a85cb90279cb126716fd39c4dcd</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 00fa5592e8ae4a85cb90279cb126716fd39c4dcd
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Wed Mar 31 22:47:25 2021 -0700

<span style='display:block; white-space:pre;color:#404040;'>    llvm-devel: update to 20200401
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    - add flang
</span><span style='display:block; white-space:pre;color:#404040;'>    - enable new flang compiler
</span><span style='display:block; white-space:pre;color:#404040;'>    - patch error in clang-tools-extra cmake script
</span><span style='display:block; white-space:pre;color:#404040;'>    - adjust fallbacks so newer compiler is used to build clang-devel
</span><span style='display:block; white-space:pre;color:#404040;'>    - force SDK for compiler_rt on older systems
</span><span style='display:block; white-space:pre;color:#404040;'>    - try to see if we can build without thread_local on 10.6 again
</span><span style='display:block; white-space:pre;color:#404040;'>    - fix python3 spec
</span><span style='display:block; white-space:pre;color:#404040;'>    - don't use pkgconfig for libffi (doesn't work)
</span><span style='display:block; white-space:pre;color:#404040;'>    - build and install libc++ dylib
</span><span style='display:block; white-space:pre;color:#404040;'>    - remove flang subport -- just install flang with clang
</span><span style='display:block; white-space:pre;color:#404040;'>    - add i386 atomics to libclang_rt
</span><span style='display:block; white-space:pre;color:#404040;'>    - fix build of libc++.dylib on 10.6
</span><span style='display:block; white-space:pre;color:#404040;'>    - re-enable parallel building (works)
</span>---
 lang/llvm-devel/Portfile                           | 79 +++++++++++++++-------
 ...libcxx-reexport-symbols-lionorgreater-only.diff | 27 ++++++++
 ...LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.diff | 16 +++++
 3 files changed, 96 insertions(+), 26 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-devel/Portfile b/lang/llvm-devel/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 51fa4f88c76..fb8a5d68610 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -8,20 +8,16 @@ PortGroup legacysupport 1.0
</span> 
 # link legacysupport statically for compilers
 legacysupport.use_static yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# limit legacysupport to 10.9 for now
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# test on 10.10 to see what happens there
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# on 10.11 there is a collision with getattrlistat (that has been fixed in legacysupportdevel)
</span> legacysupport.newest_darwin_requires_legacy 13
 
 # for devel
 PortGroup github        1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set llvm-commit         1c5f08312874717caf5d94729d825c32845773ec
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set date                20210305
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set llvm-commit         d1828937ed8d79a772ec60a8f3c7f4a873f581d4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set date                20210401
</span> set llvm_version        devel
 
 # for release
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# set llvm_version 12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set llvm_version 13
</span> 
 set llvm_version_no_dot 13
 set clang_executable_version 13
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,9 +25,9 @@ set lldb_executable_version 13
</span> 
 github.setup            llvm llvm-project ${llvm-commit}
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums               rmd160  0e49b6e6f6a4d92c0711c96cb63f410d8f6499be \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        sha256  e54ae4728298a38c35283cec49b157b957e92ba96d4e374f3a6891a529a93135 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        size    134911797
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums               rmd160  816af0c825b8af6da990dec07d0d7135549234cf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        sha256  d6be47a4fac26dde97a65394c9ae8cd08b6f65962386a0ed6dd373170570135f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        size    136291756
</span> 
 # for release, use      ${llvm_version}
 # version                 ${llvm_version}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -87,7 +83,7 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span> 
     # avoid:
     #    CMake Error: failed to create symbolic link '___': file already exists
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    use_parallel_build  no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    #use_parallel_build  no
</span> 
 } elseif {${subport} eq "lldb-${llvm_version}"} {
     homepage            https://lldb.llvm.org/
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -101,9 +97,6 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span> # for devel version only
 default_variants-append +assertions
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# the backtik pkgconfig setting in the ffi config line requires pkg-config
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_build-append    port:pkgconfig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> worksrcdir              llvm-project/llvm
 patch.dir               ${workpath}/llvm-project/llvm
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -121,6 +114,8 @@ post-extract {
</span>         ln -s ${workpath}/llvm-project/libcxxabi                        ${worksrcpath}/projects/libcxxabi
         ln -s ${workpath}/llvm-project/lld                              ${worksrcpath}/projects/lld
         ln -s ${workpath}/llvm-project/clang-tools-extra                ${worksrcpath}/tools/clang/tools/extra
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        ln -s ${workpath}/llvm-project/mlir                             ${worksrcpath}/tools/mlir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ln -s ${workpath}/llvm-project/flang                            ${worksrcpath}/tools/flang
</span>     } elseif {${subport} eq "lldb-${llvm_version}"} {
         ln -s ${workpath}/llvm-project/clang                            ${worksrcpath}/tools/clang
         ln -s ${workpath}/llvm-project/lldb                             ${worksrcpath}/tools/lldb
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -150,7 +145,8 @@ if {${subport} eq "clang-${llvm_version}"} {
</span>         openmp-locations.patch \
         leopard-no-asan.patch \
         5000-patch-compilerrtdarwinutils-find-macosxsdkversion.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        5002-patch-toolchains-darwin-add-back-pre-10.6-link-libs.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        5002-patch-toolchains-darwin-add-back-pre-10.6-link-libs.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        5006-patch-clang-tools-extra-LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.diff
</span> 
 # these don't apply at present
 #         1003-Default-to-ppc7400-for-OSX-10.5.patch \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -200,7 +196,7 @@ configure.args-append \
</span>     -DLLVM_INCLUDE_EXAMPLES=OFF \
     -DLLVM_BINDINGS_LIST=none \
     -DLLVM_ENABLE_FFI=ON \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    -DFFI_INCLUDE_DIR=`pkg-config --cflags-only-I libffi | sed 's/-I//'` \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    -DFFI_INCLUDE_DIR=${prefix}/include \
</span>     -DFFI_LIBRARY_DIR=${prefix}/lib
 
 if {${subport} eq "llvm-${llvm_version}"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -219,8 +215,11 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span>         -DCLANG_ENABLE_ARCMT=OFF \
         -DDARWIN_PREFER_PUBLIC_SDK=ON \
         -DLLVM_BUILD_RUNTIME=ON \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        -DLIBCXX_ENABLE_SHARED=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        -DLIBCXX_INSTALL_LIBRARY=OFF
</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;'>+    # we are going to use the new driver for flang now
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.args-append -DFLANG_BUILD_NEW_DRIVER=ON
</span> 
 } elseif {${subport} eq "lldb-${llvm_version}"} {
     #select.group        lldb
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -242,7 +241,7 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span> #                 ,typename enable_if<is_convertible<const _U1&, _T1>::value &&
 #                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # clang-1000.11.45.5 gives missing symbols for ZTIDu and others during libcxxabi build
<span style='display:block; white-space:pre;background:#ffe0e0;'>-compiler.blacklist *gcc* {clang < 1001} macports-clang-3.*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist *gcc* {clang < 1001} {macports-clang-[3-8].*}
</span> 
 # Override the normal compiler fallback list entirely since we have
 # such specific requirements.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -250,7 +249,7 @@ compiler.fallback   clang
</span> 
 # fall back to clang-9.0 when system clang is too old
 # clang-9.0 was that last one that built with clang-3.7
<span style='display:block; white-space:pre;background:#ffe0e0;'>-compiler.fallback-append macports-clang-9.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.fallback-append macports-clang-11 macports-clang-10 macports-clang-9.0 
</span> 
 # cctools is needed to handle objects from newer clang toolchains
 if {[string match macports-clang-* ${configure.compiler}]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -258,6 +257,14 @@ if {[string match macports-clang-* ${configure.compiler}]} {
</span>     depends_skip_archcheck-append cctools
 }
 
<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;'>+
</span> # Set CMAKE_LIBTOOL if we're using MacPorts-provided cctools
 if {[lsearch -exact $PortInfo(depends_build) port:cctools] != -1} {
     configure.args-append \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -266,7 +273,7 @@ if {[lsearch -exact $PortInfo(depends_build) port:cctools] != -1} {
</span> 
 depends_lib-append      port:python39
 set pythonfullpath      ${prefix}/bin/python3.9
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args-append   -D_Python3_EXECUTABLE=${pythonfullpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append   -DPython3_EXECUTABLE=${pythonfullpath}
</span> 
 platform darwin {
     # Note that we are forcing this choice.  This means that anything linking
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -298,6 +305,15 @@ platform darwin {
</span> 
     if {${subport} eq "clang-${llvm_version}"} {
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        if {${os.major} < 19} {
</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;'>+            # this system restriction means that on Catalina+ building i386 will not have these
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # we can consider applying this to all clang builds 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # once proven to have no detrimental effects on newer systems
</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>         if {${os.major} == 14} {
             # Building Xray forces build of sanitizer_common, even if
             # COMPILER_RT_BUILD_SANITIZERS=OFF, and this fails on 10.10
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -311,11 +327,6 @@ platform darwin {
</span>             configure.args-append    -DCOMPILER_RT_BUILD_SANITIZERS=OFF
         }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        if {${os.major} <= 10} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            # needs thread_local_storage enabled
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            require_active_variants port:libcxx emulated_tls
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span>         if {${os.major} <= 11} {
             # xpc.h available 10.7 but doesn't support nullable features
             # xpc.h works currently on 10.8+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -323,10 +334,22 @@ platform darwin {
</span>             configure.args-append    -DCLANGD_BUILD_XPC=OFF
         }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        if {${os.major} <= 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # needs thread_local_storage enabled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            #require_active_variants port:libcxx emulated_tls
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # Proxy for eliminating the dependency on native TLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # http://trac.macports.org/ticket/46887
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            configure.args-append -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>         if {${os.major} <= 10} {
             # the directorywatcher code is currently 10.7+
             patchfiles-append 5003-patch-no-directory-watcher-on-snowleopard.diff
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+            # reexported_symbols_list is available on 10.7+ only, used by libcxx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            patchfiles-append 5004-patch-libcxx-reexport-symbols-lionorgreater-only.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>             # the libcxx installed by MacPorts on darwin 10 and less does not correspond to Apple's builtin libcxx
             patchfiles-append 5005-MacPorts-only-patch-libcxx-includes-disable-availability-tests.diff
         }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -360,6 +383,10 @@ if {${subport} eq "clang-${llvm_version}"} {
</span>         system "cd ${destroot.dir}/projects/libcxx && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
         system "cd ${destroot.dir}/projects/libcxxabi && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
         system "cd ${destroot.dir}/projects/lld && ${destroot.cmd} ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
<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;'>+        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;'>+        system "chmod 755 ${destroot}${sub_prefix}/bin/flang"
</span> 
         delete ${destroot}${sub_prefix}/bin/clang
         file rename ${destroot}${sub_prefix}/bin/clang-${clang_executable_version} ${destroot}${sub_prefix}/bin/clang
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-devel/files/5004-patch-libcxx-reexport-symbols-lionorgreater-only.diff b/lang/llvm-devel/files/5004-patch-libcxx-reexport-symbols-lionorgreater-only.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..956c6f1fb51
</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-devel/files/5004-patch-libcxx-reexport-symbols-lionorgreater-only.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,27 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/projects/libcxx/src/CMakeLists.txt.orig      2021-02-21 12:43:30.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/projects/libcxx/src/CMakeLists.txt   2021-02-21 12:48:27.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -209,11 +209,11 @@
</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,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi.v${LIBCXX_LIBCPPABI_VERSION}.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;'>+-    if (LIBCXX_ENABLE_EXCEPTIONS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    if (LIBCXX_ENABLE_EXCEPTIONS AND (CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.7))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         target_link_libraries(cxx_shared PRIVATE "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi-exceptions.sjlj.exp")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -222,7 +222,9 @@
</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 (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-      target_link_libraries(cxx_shared PRIVATE "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi-new-delete.exp")
</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;'>++         target_link_libraries(cxx_shared PRIVATE "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi-new-delete.exp")
</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;'>+   endif()
</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-devel/files/5006-patch-clang-tools-extra-LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.diff b/lang/llvm-devel/files/5006-patch-clang-tools-extra-LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f2031cb6c4c
</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-devel/files/5006-patch-clang-tools-extra-LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/llvm/llvm-project/commit/f51ab1871655a9a96134c2636c37dcb5a6b01ac3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+changed to use LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+but this is not defined anywhere
</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;'>+--- a/tools/clang/tools/extra/clangd/quality/CompletionModel.cmake.orig    2021-04-01 09:20:32.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/tools/clang/tools/extra/clangd/quality/CompletionModel.cmake 2021-04-01 09:20:47.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5,7 +5,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # will define a C++ class called ${cpp_class} - which may be a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # namespace-qualified class name.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ function(gen_decision_forest model filename cpp_class)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-  set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(header_file ${output_dir}/${filename}.h)
</span></pre><pre style='margin:0'>

</pre>