use llvm. The new x86 backend crashes with v8.

This commit is contained in:
Karl Seguin
2025-08-29 10:41:46 +08:00
parent 23d6362058
commit 0b6a9d3a0b

View File

@@ -39,6 +39,7 @@ pub fn build(b: *Build) !void {
}, },
} }
var opts = b.addOptions(); var opts = b.addOptions();
opts.addOption( opts.addOption(
[]const u8, []const u8,
@@ -49,6 +50,9 @@ pub fn build(b: *Build) !void {
const target = b.standardTargetOptions(.{}); const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
// We're still using llvm because the new x86 backend seems to crash
// with v8. This can be reproduced in zig-v8-fork.
const lightpanda_module = b.addModule("lightpanda", .{ const lightpanda_module = b.addModule("lightpanda", .{
.root_source_file = b.path("src/main.zig"), .root_source_file = b.path("src/main.zig"),
.target = target, .target = target,
@@ -65,6 +69,7 @@ pub fn build(b: *Build) !void {
// compile and install // compile and install
const exe = b.addExecutable(.{ const exe = b.addExecutable(.{
.name = "lightpanda", .name = "lightpanda",
.use_llvm = true,
.root_module = lightpanda_module, .root_module = lightpanda_module,
}); });
b.installArtifact(exe); b.installArtifact(exe);
@@ -87,6 +92,7 @@ pub fn build(b: *Build) !void {
// compile // compile
const tests = b.addTest(.{ const tests = b.addTest(.{
.root_module = lightpanda_module, .root_module = lightpanda_module,
.use_llvm = true,
.test_runner = .{ .path = b.path("src/test_runner.zig"), .mode = .simple }, .test_runner = .{ .path = b.path("src/test_runner.zig"), .mode = .simple },
}); });
@@ -113,6 +119,7 @@ pub fn build(b: *Build) !void {
// compile and install // compile and install
const wpt = b.addExecutable(.{ const wpt = b.addExecutable(.{
.name = "lightpanda-wpt", .name = "lightpanda-wpt",
.use_llvm = true,
.root_module = wpt_module, .root_module = wpt_module,
}); });