pdhaliwal added a comment.

Hi,

Sorry for late reply.

> If that is not feasible for some reason, I would lean towards your option 
> (2), but I think more is needed in this patch to ensure the generation script 
> is always run, right?

I think you are right. As of now, just removing the dependency on 
`.git/logs/HEAD` is not triggering the cmake script for even when branch is 
changed. One way I tried to solve this was to retain the dependency on 
`.git/logs/HEAD` if it is present and fallback to `.git/HEAD` if it is missing. 
Basically, `.git/HEAD` will ensure the retrigger on every branch-to-branch 
change or headless checkouts but will not retrigger in case of changes on same 
branch. Not sure if it is a good idea.

Another solution that I found was to use the logic mentioned here: 
https://stackoverflow.com/questions/13920072/how-to-always-run-command-when-building-regardless-of-any-dependency.
 This requires a bit more code, but ensures all the required cases are handled. 
I think this should be used only in case of branchless checkouts and keep the 
old behaviour if `.git/logs/HEAD` is present. I will test this and update here 
if it is able to solve the problem.

> We also don't need to check Clang or LLD source tree separately from LLVM now 
> that everything is in one repo, but the logic for determining Git revision 
> should be still correct.

I will submit this as a separate patch once this gets resolved.

Let me know if your thoughts.

Thanks,
Dhaliwal


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79400/new/

https://reviews.llvm.org/D79400



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to