Skip to content

Commit 58b71bb

Browse files
author
git apple-llvm automerger
committed
Merge commit 'd104e582838f' from llvm.org/release/11.x into apple/stable/20200714
2 parents 32cd3e2 + d104e58 commit 58b71bb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,13 @@ function(setup_dependency_debugging name)
21042104
set_target_properties(${name} PROPERTIES RULE_LAUNCH_COMPILE ${sandbox_command})
21052105
endfunction()
21062106

2107+
# If the sources at the given `path` are under version control, set `out_var`
2108+
# to the the path of a file which will be modified when the VCS revision
2109+
# changes, attempting to create that file if it does not exist; if no such
2110+
# file exists and one cannot be created, instead set `out_var` to the
2111+
# empty string.
2112+
#
2113+
# If the sources are not under version control, do not define `out_var`.
21072114
function(find_first_existing_vc_file path out_var)
21082115
if(NOT EXISTS "${path}")
21092116
return()
@@ -2125,6 +2132,7 @@ function(find_first_existing_vc_file path out_var)
21252132
RESULT_VARIABLE touch_head_result
21262133
ERROR_QUIET)
21272134
if (NOT touch_head_result EQUAL 0)
2135+
set(${out_var} "" PARENT_SCOPE)
21282136
return()
21292137
endif()
21302138
endif()

llvm/include/llvm/Support/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if(LLVM_APPEND_VC_REV)
1111
# A fake version file and is not expected to exist. It is being used to
1212
# force regeneration of VCSRevision.h for source directory with no write
1313
# permission available.
14-
if (NOT llvm_vc)
14+
if (llvm_vc STREQUAL "")
1515
set(fake_version_inc "${CMAKE_CURRENT_BINARY_DIR}/__FakeVCSRevision.h")
1616
endif()
1717
endif()

0 commit comments

Comments
 (0)