Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ set(CLANG_ENABLE_FORMAT OFF CACHE BOOL "")
#---Remove the inherited include_directories()
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "")

#---Disable VCS writing to prevent that we always have to rebuild when someone touched the git HEAD
set(LLVM_APPEND_VC_REV OFF CACHE BOOL "Disabled LLVM revision dependency" FORCE)

#---Add the sub-directory excluding all the targets from all-----------------------------------------
if(CMAKE_GENERATOR MATCHES "Xcode")
add_subdirectory(llvm/src)
Expand Down
7 changes: 7 additions & 0 deletions interpreter/llvm/src/include/llvm/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h")

set(get_svn_script "${LLVM_CMAKE_PATH}/GenerateVersionFromCVS.cmake")

# Ugly hack to prevent rebuilding LLVM whenever the git HEAD timestamp
# changes. This is properly solved by setting LLVM_APPEND_VC_REV to OFF
# but this only really works once this review is included in our LLVM
# version: https://reviews.llvm.org/D35377
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we backport it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's multiple commits that refactored this thing, D35377 is only the one that actually makes it fully work as intended (we don't even have the setting variable he's using in our CMake code yet), and backporting bigger pieces of CMake code isn't a lot of fun.

It's also just until the next LLVM upgrade where the other commit fixes this properly and we can drop this hack.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me, thanks for explaining.

# Once our LLVM version includes this review, this code can be removed
# as we properly set LLVM_APPEND_VC_REV in interpreter/CMakeLists.txt.
set(llvm_vc)
if(DEFINED llvm_vc)
# Create custom target to generate the VC revision include.
add_custom_command(OUTPUT "${version_inc}"
Expand Down