| ... | @@ -1048,6 +1048,18 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { | ... | @@ -1048,6 +1048,18 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 1048 | break :blk buf.items[0 .. buf.items.len - 1 :0].ptr; | 1048 | break :blk buf.items[0 .. buf.items.len - 1 :0].ptr; |
| 1049 | } else null; | 1049 | } else null; |
| 1050 | | 1050 | |
| | 1051 | if (options.verbose_llvm_cpu_features) { |
| | 1052 | if (llvm_cpu_features) |cf| print: { |
| | 1053 | std.debug.getStderrMutex().lock(); |
| | 1054 | defer std.debug.getStderrMutex().unlock(); |
| | 1055 | const stderr = std.io.getStdErr().writer(); |
| | 1056 | nosuspend stderr.print("compilation: {s}\n", .{options.root_name}) catch break :print; |
| | 1057 | nosuspend stderr.print(" target: {s}\n", .{try options.target.zigTriple(arena)}) catch break :print; |
| | 1058 | nosuspend stderr.print(" cpu: {s}\n", .{options.target.cpu.model.name}) catch break :print; |
| | 1059 | nosuspend stderr.print(" features: {s}\n", .{cf}) catch {}; |
| | 1060 | } |
| | 1061 | } |
| | 1062 | |
| 1051 | const strip = options.strip orelse !target_util.hasDebugInfo(options.target); | 1063 | const strip = options.strip orelse !target_util.hasDebugInfo(options.target); |
| 1052 | const red_zone = options.want_red_zone orelse target_util.hasRedZone(options.target); | 1064 | const red_zone = options.want_red_zone orelse target_util.hasRedZone(options.target); |
| 1053 | const omit_frame_pointer = options.omit_frame_pointer orelse (options.optimize_mode != .Debug); | 1065 | const omit_frame_pointer = options.omit_frame_pointer orelse (options.optimize_mode != .Debug); |