File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
const std = @import ("std" );
2
+ const builtin = @import ("builtin" );
2
3
3
4
pub fn build (b : * std.Build ) ! void {
4
5
const target = b .standardTargetOptions (.{});
5
6
const optimize = b .standardOptimizeOption (.{});
6
7
7
8
const tcc_dep = b .dependency ("tinycc" , .{});
8
9
10
+ const build_native_target : std.Build.ResolvedTarget = .{
11
+ .query = try std .Target .Query .parse (.{}),
12
+ .result = builtin .target ,
13
+ };
14
+
9
15
const c2str_step = b .step ("config-tcc" , "Generate tccdefs_.h" );
10
16
{
11
17
const c2str_exe = b .addExecutable (.{
12
18
.name = "config-tcc" ,
13
- .target = target ,
19
+ .target = build_native_target ,
14
20
.optimize = .Debug ,
15
21
});
16
22
@@ -52,6 +58,10 @@ pub fn build(b: *std.Build) !void {
52
58
var FLAGS = std .ArrayList ([]const u8 ).init (b .allocator );
53
59
var C_SOURCES = std .ArrayList (std .Build .LazyPath ).init (b .allocator );
54
60
61
+ try FLAGS .append ("-Wall" );
62
+ try FLAGS .append ("-fno-strict-aliasing" );
63
+ try FLAGS .append ("-O3" );
64
+
55
65
try FLAGS .append ("-DCONFIG_TCC_PREDEFS" );
56
66
try FLAGS .append ("-DONE_SOURCE=0" );
57
67
try FLAGS .append ("-DTCC_LIBTCC1=\" \\ 0\" " );
You can’t perform that action at this time.
0 commit comments