@@ -47,6 +47,8 @@ pub fn build(b: *std.Build) !void {
47
47
48
48
const options = try jsruntime .buildOptions (b );
49
49
50
+ const x86 = b .option (bool , "x86" , "Use x86 backend" ) orelse false ;
51
+
50
52
// browser
51
53
// -------
52
54
@@ -56,6 +58,8 @@ pub fn build(b: *std.Build) !void {
56
58
.root_source_file = b .path ("src/main.zig" ),
57
59
.target = target ,
58
60
.optimize = mode ,
61
+ .use_llvm = ! x86 ,
62
+ .use_lld = ! x86 ,
59
63
});
60
64
try common (b , exe , options );
61
65
b .installArtifact (exe );
@@ -79,6 +83,8 @@ pub fn build(b: *std.Build) !void {
79
83
.root_source_file = b .path ("src/main_shell.zig" ),
80
84
.target = target ,
81
85
.optimize = mode ,
86
+ .use_llvm = ! x86 ,
87
+ .use_lld = ! x86 ,
82
88
});
83
89
try common (b , shell , options );
84
90
try jsruntime_pkgs .add_shell (shell );
@@ -102,6 +108,8 @@ pub fn build(b: *std.Build) !void {
102
108
.test_runner = b .path ("src/test_runner.zig" ),
103
109
.target = target ,
104
110
.optimize = mode ,
111
+ .use_llvm = ! x86 ,
112
+ .use_lld = ! x86 ,
105
113
});
106
114
try common (b , tests , options );
107
115
@@ -128,6 +136,8 @@ pub fn build(b: *std.Build) !void {
128
136
.root_source_file = b .path ("src/main_wpt.zig" ),
129
137
.target = target ,
130
138
.optimize = mode ,
139
+ .use_llvm = ! x86 ,
140
+ .use_lld = ! x86 ,
131
141
});
132
142
try common (b , wpt , options );
133
143
@@ -149,6 +159,8 @@ pub fn build(b: *std.Build) !void {
149
159
.root_source_file = b .path ("src/main_get.zig" ),
150
160
.target = target ,
151
161
.optimize = mode ,
162
+ .use_llvm = ! x86 ,
163
+ .use_lld = ! x86 ,
152
164
});
153
165
try common (b , get , options );
154
166
b .installArtifact (get );
0 commit comments