[llvm] r367084 - Fix macOS build after r358716
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 22:17:14 PDT 2019
Author: kongyi
Date: Thu Jul 25 22:17:14 2019
New Revision: 367084
URL: http://llvm.org/viewvc/llvm-project?rev=367084&view=rev
Log:
Fix macOS build after r358716
COPYFILE_CLONE is only defined on newer macOS versions, using it without
check breaks build on systems running legacy OS and toolchain.
Differential Revision: https://reviews.llvm.org/D65317
Modified:
llvm/trunk/lib/Support/Unix/Path.inc
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=367084&r1=367083&r2=367084&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Thu Jul 25 22:17:14 2019
@@ -1203,7 +1203,7 @@ namespace fs {
/// implementation.
std::error_code copy_file(const Twine &From, const Twine &To) {
uint32_t Flag = COPYFILE_DATA;
-#if __has_builtin(__builtin_available)
+#if __has_builtin(__builtin_available) && defined(COPYFILE_CLONE)
if (__builtin_available(macos 10.12, *)) {
bool IsSymlink;
if (std::error_code Error = is_symlink_file(From, IsSymlink))
More information about the llvm-commits
mailing list