[PATCH] D31985: Support: Add a VCSRevision.h header file.
Quentin Neill via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 11:42:36 PDT 2017
qneill2014 added a comment.
In https://reviews.llvm.org/D31985#733509, @qneill2014 wrote:
> Thanks. That fixes the build breakage, but it still won't work with "repo" managed repositories....
(Just in case my comment edits above didn't get noticed - reposting the last part with my proposed diff again.)
I think you could just use ".git/HEAD" itself. If this feature is merely tracking a dependency to detect when to regenerate the header, that should work perfectly.
This works for the "repo" case. Let me know @pcc if that works for your tests, and if you will post the fix or if you would like me to do it.
diff --git a/include/llvm/Support/CMakeLists.txt b/include/llvm/Support/CMakeLists.txt
index b4b9937..377462a 100644
--- a/include/llvm/Support/CMakeLists.txt
+++ b/include/llvm/Support/CMakeLists.txt
@@ -17,7 +17,7 @@ macro(find_first_existing_vc_file out_var path)
OUTPUT_VARIABLE git_dir)
if(git_result EQUAL 0)
string(STRIP "${git_dir}" git_dir)
- set(${out_var} "${git_dir}/logs/HEAD")
+ set(${out_var} "${git_dir}/HEAD")
else()
find_first_existing_file(${out_var}
"${path}/.svn/wc.db" # SVN 1.7
Repository:
rL LLVM
https://reviews.llvm.org/D31985
More information about the llvm-commits
mailing list