-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
n2 re-runs generator on first build #40
Comments
I retitled this about the larger issue, which is that n2 doesn't recognize when your build files have been generated outside of n2. I have been thinking about this issue and I'm still not quite sure what to do about it. BTW the gn build of llvm (https://llvm.org/devmtg/2018-10/slides/Weber-FunnerLLVMDevelopment.pdf) generates so quickly you don't notice this happening. :) |
My current best thought is to have some sort of |
How does ninja do this currently? Guessing it keeps track of the files another way? I seem to remember that CMake automatically calls ninja after each configure to clean up the dep tree or something. Maybe n2 could hijack those tools in an ugly way. |
CMake calls |
I am kinda unhappy with my solution here, I am thinking it over still so I am gonna leave this bug open. |
Notes to self, there are two broad situations we care about:
The But we could solve case #1, which is the only case this bug was initially filed about, by just saying "if there was no .n2_db file, mark build.ninja as up to date immediately", which requires much less user intervention. And case 2 is possibly a relatively rare user scenario (?) |
I just retested this today and n2 re-runs CMake everytime on windows. I can check on it if you think it should work, then it might be another Windows specific issue. |
@evmar ping on this again, with the other issues handled now, this is the one that's blocking me from using n2 daily. It re-runs CMake on every invocation. Any tips on how to debug that? |
Argh, sorry! I have reproed locally, taking a look. |
Please let me know if that works for you, I hope I got it right this time... |
Hi! Yeah it seems like it worked on the initial test, I will use n2 as my default ninja for a while and let you know if I ever encounter it again! |
I am back to thinking about this again because Meson also triggers this. Relevant code only invokes In n2's case it rebuilds in any case where it doesn't know the provenance of generated files, so that is not enough. And the current thing where to make CMake work we require you to install n2 as your |
ninja
in the PATHcmake -GNinja ../llvm
ninja
-> cmake being re-builtThis might be something in the LLVM CMake scripts of course, but I wanted to report it anyway since using it for LLVM would give some good benefits.
The text was updated successfully, but these errors were encountered: