| ... | ... | @@ -684,7 +684,11 @@ pub const Builder = struct { |
| 684 | 684 | ); |
| 685 | 685 | const mcpu = self.option([]const u8, "cpu", "Target CPU features to add or subtract"); |
| 686 | 686 | |
| 687 | | const triple = maybe_triple orelse return args.default_target; |
| 687 | if (maybe_triple == null and mcpu == null) { |
| 688 | return args.default_target; |
| 689 | } |
| 690 | |
| 691 | const triple = maybe_triple orelse "native"; |
| 688 | 692 | |
| 689 | 693 | var diags: CrossTarget.ParseOptions.Diagnostics = .{}; |
| 690 | 694 | const selected_target = CrossTarget.parse(.{ |
| ... | ... | @@ -2432,11 +2436,8 @@ pub const LibExeObjStep = struct { |
| 2432 | 2436 | |
| 2433 | 2437 | if (populated_cpu_features.eql(cross.cpu.features)) { |
| 2434 | 2438 | // The CPU name alone is sufficient. |
| 2435 | | // If it is the baseline CPU, no command line args are required. |
| 2436 | | if (cross.cpu.model != std.Target.Cpu.baseline(cross.cpu.arch).model) { |
| 2437 | | try zig_args.append("-mcpu"); |
| 2438 | | try zig_args.append(cross.cpu.model.name); |
| 2439 | | } |
| 2439 | try zig_args.append("-mcpu"); |
| 2440 | try zig_args.append(cross.cpu.model.name); |
| 2440 | 2441 | } else { |
| 2441 | 2442 | var mcpu_buffer = std.ArrayList(u8).init(builder.allocator); |
| 2442 | 2443 | |