[all-commits] [llvm/llvm-project] ee68f6: Second try: [clang][cmake] Add options to pass in ...
Han Zhu via All-commits
all-commits at lists.llvm.org
Mon Apr 17 10:54:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee68f612ba682ddb911c5621e63df56039ec5824
https://github.com/llvm/llvm-project/commit/ee68f612ba682ddb911c5621e63df56039ec5824
Author: Han Zhu <zhuhan7737 at gmail.com>
Date: 2023-04-17 (Mon, 17 Apr 2023)
Changed paths:
M clang/lib/Basic/CMakeLists.txt
M llvm/cmake/modules/GenerateVersionFromVCS.cmake
Log Message:
-----------
Second try: [clang][cmake] Add options to pass in vcs repo and revision info
V2: Fix cmake error when -DLLVM_APPEND_VC_REV=OFF
Clang may be built in an environment where Git is not available. In our case,
Clang is part of a larger monorepo which is not Git-based, and
GenerateVersionFromVCS was not able to get source info.
Provide options to pass in repo and revision info from cmake.
```
cmake \
-DCLANG_VC_REPOSITORY=abc://repo.url.com \
-DCLANG_VC_REVISION=abcd1234 \
...
```
This would allow us to prepare the source info beforehand and pass it to the
clang binary.
Differential Revision: https://reviews.llvm.org/D148262
More information about the All-commits
mailing list