remove CMakeCache before building (#24860)

So it doesn't cache flags that are passed to the build
This commit is contained in:
pfg
2025-12-01 22:02:46 -08:00
committed by GitHub
parent 800a937cc2
commit e9e93244cb
2 changed files with 4 additions and 1 deletions

View File

@@ -607,7 +607,7 @@ fn configureObj(b: *Build, opts: *BunBuildOptions, obj: *Compile) void {
obj.llvm_codegen_threads = opts.llvm_codegen_threads orelse 0;
}
obj.no_link_obj = opts.os != .windows;
obj.no_link_obj = opts.os != .windows and !opts.no_llvm;
if (opts.enable_asan and !enableFastBuild(b)) {

View File

@@ -87,6 +87,9 @@ async function build(args) {
flag.startsWith("-D") ? [`${flag}=${value}`] : [flag, value],
);
try {
await Bun.file(buildPath + "/CMakeCache.txt").delete();
} catch (e) {}
await startGroup("CMake Configure", () => spawn("cmake", generateArgs, { env }));
const envPath = resolve(buildPath, ".env");