mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
remove CMakeCache before building (#24860)
So it doesn't cache flags that are passed to the build
This commit is contained in:
@@ -607,7 +607,7 @@ fn configureObj(b: *Build, opts: *BunBuildOptions, obj: *Compile) void {
|
|||||||
obj.llvm_codegen_threads = opts.llvm_codegen_threads orelse 0;
|
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)) {
|
if (opts.enable_asan and !enableFastBuild(b)) {
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ async function build(args) {
|
|||||||
flag.startsWith("-D") ? [`${flag}=${value}`] : [flag, value],
|
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 }));
|
await startGroup("CMake Configure", () => spawn("cmake", generateArgs, { env }));
|
||||||
|
|
||||||
const envPath = resolve(buildPath, ".env");
|
const envPath = resolve(buildPath, ".env");
|
||||||
|
|||||||
Reference in New Issue
Block a user