test: a std module rebuilt in place recompiles the units importing it
StdPcmRebuild builds a project whose main.cpp imports std, then dates the source before the object and the object before std.pcm, as a std module rebuilt after the object leaves them, so that nothing else makes the object stale. The next build has to compile main.cpp again, and the idle build before it must compile nothing. Without -fmodule-file-deps the object was only relinked. The test redirects the cache, since redating a std PCM the real cache shares would rebuild its other users. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
27697d06aa
commit
8e759a8410
3 changed files with 94 additions and 0 deletions
8
tests/StdPcmRebuild/fixture/main.cpp
Normal file
8
tests/StdPcmRebuild/fixture/main.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("rebuilt");
|
||||
}
|
||||
Loading…
Reference in a new issue