diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-15 02:02:36 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-15 02:02:36 -0700 |
| commit | a38042e3ac446194ae1496513d9b4634b1dd94b8 (patch) | |
| tree | 5e541657bdf7949de3f963ff0119a46af12e2e21 /lib/std | |
| parent | fa633a658f75d461da00fad9a72456e1420d2d62 (diff) | |
| download | zig-a38042e3ac446194ae1496513d9b4634b1dd94b8.tar.gz zig-a38042e3ac446194ae1496513d9b4634b1dd94b8.zip | |
ci: windows: proper flags to zig build
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/build.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index a652de9c12..05871efba8 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -675,17 +675,19 @@ pub const Builder = struct { /// Exposes standard `zig build` options for choosing a target. pub fn standardTargetOptions(self: *Builder, args: StandardTargetOptionsArgs) CrossTarget { - const triple = self.option( + const maybe_triple = self.option( []const u8, "target", "The CPU architecture, OS, and ABI to build for", - ) orelse return args.default_target; + ); + const mcpu = self.option([]const u8, "cpu", "Target CPU"); - // TODO add cpu and features as part of the target triple + const triple = maybe_triple orelse return args.default_target; var diags: CrossTarget.ParseOptions.Diagnostics = .{}; const selected_target = CrossTarget.parse(.{ .arch_os_abi = triple, + .cpu_features = mcpu, .diagnostics = &diags, }) catch |err| switch (err) { error.UnknownCpuModel => { |
