diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-17 11:29:39 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-17 13:35:07 +0300 |
commit | c498abb1032026fac3b84f3622264b34c27212af (patch) | |
tree | 133c28287e76fb06bbca3519ca8c7a5e39a4aa3b /build_files/build_environment | |
parent | 395e0c79bdb934d3f0d954ebe76d8e7d0c553986 (diff) |
Fix macOS LLVM precompiled link error with older Xcode versions
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/cmake/llvm.cmake | 1 | ||||
-rw-r--r-- | build_files/build_environment/patches/llvm.diff | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/build_files/build_environment/cmake/llvm.cmake b/build_files/build_environment/cmake/llvm.cmake index 3ef0445201f..981db9c72b7 100644 --- a/build_files/build_environment/cmake/llvm.cmake +++ b/build_files/build_environment/cmake/llvm.cmake @@ -40,6 +40,7 @@ ExternalProject_Add(ll URL_HASH MD5=${LLVM_HASH} CMAKE_GENERATOR ${LLVM_GENERATOR} PREFIX ${BUILD_DIR}/ll + PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/llvm ) diff --git a/build_files/build_environment/patches/llvm.diff b/build_files/build_environment/patches/llvm.diff new file mode 100644 index 00000000000..b797bb030ee --- /dev/null +++ b/build_files/build_environment/patches/llvm.diff @@ -0,0 +1,13 @@ +--- a/lib/Support/Unix/Path.inc 2020-02-17 09:24:26.000000000 +0100 ++++ b/lib/Support/Unix/Path.inc 2020-02-17 09:26:25.000000000 +0100 +@@ -1200,7 +1200,9 @@ + /// implementation. + std::error_code copy_file(const Twine &From, const Twine &To) { + uint32_t Flag = COPYFILE_DATA; +-#if __has_builtin(__builtin_available) && defined(COPYFILE_CLONE) ++ // BLENDER: This optimization makes LLVM not build on older Xcode versions, ++ // just disable until everyone has new enough Xcode versions. ++#if 0 + if (__builtin_available(macos 10.12, *)) { + bool IsSymlink; + if (std::error_code Error = is_symlink_file(From, IsSymlink)) |