This revision was automatically updated to reflect the committed changes.
Closed by commit rL354417: CMake: Fix stand-alone clang builds since r353268
(authored by tstellar, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58204?vs=186769&id=187473#toc
Repository:
rL LLVM
smeenai accepted this revision.
smeenai added a comment.
LGTM. There's more clean up that could be done here, but this addresses the
immediate issue. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58204/new/
https://reviews.llvm.org/D58204
tstellar updated this revision to Diff 186769.
tstellar added a comment.
Updated patch to fix non-standalone builds. There is more refactoring
that could be done, but this at least restores functionality to before
r353268.
I have tested non-standalone builds and standalone builds with and
withou
smeenai added a comment.
This could also be improved by teaching clang to use LLVM_BUILD_MAIN_SRC_DIR
when that's available.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58204/new/
https://reviews.llvm.org/D58204
__
tstellar marked an inline comment as done.
tstellar added inline comments.
Comment at: clang/lib/Basic/CMakeLists.txt:13
-set(generate_vcs_version_script
"${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
+set(generate_vcs_version_script
"${LLVM_CMAKE_DIR}/GenerateVersionFrom
andrewrk accepted this revision.
andrewrk added a comment.
I confirm this solves the issue.
Comment at: llvm/cmake/modules/AddLLVM.cmake:1739
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_res
smeenai added inline comments.
Comment at: clang/lib/Basic/CMakeLists.txt:13
-set(generate_vcs_version_script
"${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
+set(generate_vcs_version_script
"${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
Will this wor
phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58204/new/
https://reviews.llvm.org/D58204
___
tstellar created this revision.
tstellar added reviewers: phosek, andrewrk, smeenai.
Herald added subscribers: cfe-commits, mgorny.
Herald added projects: clang, LLVM.
Handle the case where LLVM_MAIN_SRC_DIR is not set and also use
LLVM_CMAKE_DIR for locating installed cmake files rather than
LLVM