[all-commits] [llvm/llvm-project] 1f5e73: [clang][cmake] Add options to pass in vcs repo and...
Han Zhu via All-commits
all-commits at lists.llvm.org
Mon Apr 17 09:50:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1f5e737fc135bf991889a1364b8f8c5edc3953d2
https://github.com/llvm/llvm-project/commit/1f5e737fc135bf991889a1364b8f8c5edc3953d2
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:
-----------
[clang][cmake] Add options to pass in vcs repo and revision info
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