summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-01-16 19:04:08 -0500
committerTom Stellard <tstellar@redhat.com>2020-06-23 14:35:35 -0700
commit0777c907268a8197de102f3770432b0f185de30a (patch)
tree38d900d421014da7d9593dd87f85938f1699e1e7 /lld
parent97065683c6a965be9bc3dc06b0264940ed75c4af (diff)
downloadbcm5719-llvm-0777c907268a8197de102f3770432b0f185de30a.tar.gz
bcm5719-llvm-0777c907268a8197de102f3770432b0f185de30a.zip
Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well.
When LLVM_APPEND_VC_REV=OFF is set, the current git hash is no longer embedded into binaries (mostly for --version output). Without it, most binaries need to relink after every single commit, even if they didn't change otherwise (due to, say, a documentation-only commit). LLVM_APPEND_VC_REV is ON by default, so this doesn't change the default behavior of anything. With this, all clients of GenerateVersionFromVCS.cmake honor LLVM_APPEND_VC_REV. Differential Revision: https://reviews.llvm.org/D72855 (cherry picked from commit fb5fafb23cc2d8613f8be2487afe94d8594a88ce)
Diffstat (limited to 'lld')
-rw-r--r--lld/Common/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/Common/CMakeLists.txt b/lld/Common/CMakeLists.txt
index 1a04a8074be..7d5ad654925 100644
--- a/lld/Common/CMakeLists.txt
+++ b/lld/Common/CMakeLists.txt
@@ -8,14 +8,14 @@ find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
-if(lld_vc)
+if(lld_vc AND LLVM_APPEND_VC_REV)
set(lld_source_dir ${LLD_SOURCE_DIR})
endif()
add_custom_command(OUTPUT "${version_inc}"
DEPENDS "${lld_vc}" "${generate_vcs_version_script}"
COMMAND ${CMAKE_COMMAND} "-DNAMES=LLD"
- "-DLLD_SOURCE_DIR=${LLD_SOURCE_DIR}"
+ "-DLLD_SOURCE_DIR=${lld_source_dir}"
"-DHEADER_FILE=${version_inc}"
-P "${generate_vcs_version_script}")
OpenPOWER on IntegriCloud