-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
bootstrap should rebuild LLVM when it changes #111893
Comments
hmm, #64156 looks related. I am not sure why that would be the correct behavior? If CFLAGS has changed we should rebuild; I would expect distros to make sure CFLAGS matches between invocations of bootstrap. |
The stamp checking for the "normal" case, when not building from a source tarball, has been there since the initial commit of bootstrap: 046e687#diff-ddd5cbd996a9fbebe15be7bb2d9254ea4c1336d6c2e47a5da2a76719df572c01R30-R38 |
Are you trying to address the git "dirty" case, or the non-git case, or both? |
Both, but primarily the git case since that's how most people are developing I think. |
Ok, I agree the git case is where folks may actually be making changes, and I still think it's ok not to automatically "notice" changes in the non-git case. LLVM is big enough that checking for dirty git may not be cheap though. On my Linux system with NVME, it takes ~0.5s after dropping page caches, and ~0.15s cached. On systems with slower disks, virus scanners, etc., it may be a lot worse. |
Yeah, I don't think this is particularly important. The main issue with making changes to LLVM is #109070, which prevents the change from being picked up even if you do commit it. |
Rollup merge of rust-lang#118187 - onur-ozkan:recompile-llvm-on-changes, r=clubby789 Recompile LLVM when it changes in the git sources Utilize a smart hash for 'llvm-finished-building' to enable recompilation of LLVM with each change in the git sources. Each change generates a unique hash value in 'llvm-finished-building', which ensures LLVM compilations only triggered with further changes. Resolves rust-lang#111893 cc `@rust-lang/wg-llvm`
I tried this code:
I expected to see this happen: bootstrap rebuilds LLVM, since it's changed.
Instead, this happened: bootstrap does nothing.
The problem is that we 're using a stamp file and assume that if the commit hasn't changed then none of the files have changed either:
rust/src/bootstrap/llvm.rs
Lines 108 to 123 in 95e8b6a
I am not sure why we do that? Are we assuming that CMake rebuilds too frequently? That seems like something we should fix upstream ...
cc @rust-lang/wg-llvm, I think this would make your lives easier.
Meta
HEAD is branched from ba6f5e3.
The text was updated successfully, but these errors were encountered: