Skip to content

Commit e9e9324

Browse files
authored
remove CMakeCache before building (#24860)
So it doesn't cache flags that are passed to the build
1 parent 800a937 commit e9e9324

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ fn configureObj(b: *Build, opts: *BunBuildOptions, obj: *Compile) void {
607607
obj.llvm_codegen_threads = opts.llvm_codegen_threads orelse 0;
608608
}
609609

610-
obj.no_link_obj = opts.os != .windows;
610+
obj.no_link_obj = opts.os != .windows and !opts.no_llvm;
611611

612612

613613
if (opts.enable_asan and !enableFastBuild(b)) {

scripts/build.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ async function build(args) {
8787
flag.startsWith("-D") ? [`${flag}=${value}`] : [flag, value],
8888
);
8989

90+
try {
91+
await Bun.file(buildPath + "/CMakeCache.txt").delete();
92+
} catch (e) {}
9093
await startGroup("CMake Configure", () => spawn("cmake", generateArgs, { env }));
9194

9295
const envPath = resolve(buildPath, ".env");

0 commit comments

Comments
 (0)