This revision was automatically updated to reflect the committed changes. Closed by commit rGfb5fafb23cc2: Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well. (authored by thakis). Herald added projects: clang, LLDB.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72855/new/ https://reviews.llvm.org/D72855 Files: clang/lib/Basic/CMakeLists.txt lld/Common/CMakeLists.txt lldb/source/CMakeLists.txt llvm/cmake/modules/LLVMConfig.cmake.in llvm/docs/CMake.rst Index: llvm/docs/CMake.rst =================================================================== --- llvm/docs/CMake.rst +++ llvm/docs/CMake.rst @@ -272,7 +272,7 @@ Generate build targets for the LLVM benchmarks. Defaults to ON. **LLVM_APPEND_VC_REV**:BOOL - Embed version control revision info (svn revision number or Git revision id). + Embed version control revision info (Git revision id). The version info is provided by the ``LLVM_REVISION`` macro in ``llvm/include/llvm/Support/VCSRevision.h``. Developers using git who don't need revision info can disable this option to avoid re-linking most binaries Index: llvm/cmake/modules/LLVMConfig.cmake.in =================================================================== --- llvm/cmake/modules/LLVMConfig.cmake.in +++ llvm/cmake/modules/LLVMConfig.cmake.in @@ -78,6 +78,8 @@ set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@") set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@") +set(LLVM_APPEND_VC_REV "@LLVM_APPEND_VC_REV@") + # These variables are duplicated for install tree but they have different # values for build tree. LLVM_INCLUDE_DIRS contains both source # and generated include directories while the following variables have Index: lldb/source/CMakeLists.txt =================================================================== --- lldb/source/CMakeLists.txt +++ lldb/source/CMakeLists.txt @@ -18,14 +18,14 @@ set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") -if(lldb_vc) +if(lldb_vc AND LLVM_APPEND_VC_REV) set(lldb_source_dir ${LLDB_SOURCE_DIR}) endif() add_custom_command(OUTPUT "${version_inc}" DEPENDS "${lldb_vc}" "${generate_vcs_version_script}" COMMAND ${CMAKE_COMMAND} "-DNAMES=LLDB" - "-DLLDB_SOURCE_DIR=${LLDB_SOURCE_DIR}" + "-DLLDB_SOURCE_DIR=${lldb_source_dir}" "-DHEADER_FILE=${version_inc}" -P "${generate_vcs_version_script}") Index: lld/Common/CMakeLists.txt =================================================================== --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -8,14 +8,14 @@ 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}") Index: clang/lib/Basic/CMakeLists.txt =================================================================== --- clang/lib/Basic/CMakeLists.txt +++ clang/lib/Basic/CMakeLists.txt @@ -12,10 +12,10 @@ set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") -if(llvm_vc) +if(llvm_vc AND LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) endif() -if(clang_vc) +if(clang_vc AND LLVM_APPEND_VC_REV) set(clang_source_dir ${CLANG_SOURCE_DIR}) endif()
Index: llvm/docs/CMake.rst =================================================================== --- llvm/docs/CMake.rst +++ llvm/docs/CMake.rst @@ -272,7 +272,7 @@ Generate build targets for the LLVM benchmarks. Defaults to ON. **LLVM_APPEND_VC_REV**:BOOL - Embed version control revision info (svn revision number or Git revision id). + Embed version control revision info (Git revision id). The version info is provided by the ``LLVM_REVISION`` macro in ``llvm/include/llvm/Support/VCSRevision.h``. Developers using git who don't need revision info can disable this option to avoid re-linking most binaries Index: llvm/cmake/modules/LLVMConfig.cmake.in =================================================================== --- llvm/cmake/modules/LLVMConfig.cmake.in +++ llvm/cmake/modules/LLVMConfig.cmake.in @@ -78,6 +78,8 @@ set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@") set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@") +set(LLVM_APPEND_VC_REV "@LLVM_APPEND_VC_REV@") + # These variables are duplicated for install tree but they have different # values for build tree. LLVM_INCLUDE_DIRS contains both source # and generated include directories while the following variables have Index: lldb/source/CMakeLists.txt =================================================================== --- lldb/source/CMakeLists.txt +++ lldb/source/CMakeLists.txt @@ -18,14 +18,14 @@ set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") -if(lldb_vc) +if(lldb_vc AND LLVM_APPEND_VC_REV) set(lldb_source_dir ${LLDB_SOURCE_DIR}) endif() add_custom_command(OUTPUT "${version_inc}" DEPENDS "${lldb_vc}" "${generate_vcs_version_script}" COMMAND ${CMAKE_COMMAND} "-DNAMES=LLDB" - "-DLLDB_SOURCE_DIR=${LLDB_SOURCE_DIR}" + "-DLLDB_SOURCE_DIR=${lldb_source_dir}" "-DHEADER_FILE=${version_inc}" -P "${generate_vcs_version_script}") Index: lld/Common/CMakeLists.txt =================================================================== --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -8,14 +8,14 @@ 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}") Index: clang/lib/Basic/CMakeLists.txt =================================================================== --- clang/lib/Basic/CMakeLists.txt +++ clang/lib/Basic/CMakeLists.txt @@ -12,10 +12,10 @@ set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") -if(llvm_vc) +if(llvm_vc AND LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) endif() -if(clang_vc) +if(clang_vc AND LLVM_APPEND_VC_REV) set(clang_source_dir ${CLANG_SOURCE_DIR}) endif()
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits