| ... | ... | @@ -946,13 +946,13 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 946 | 946 | }; |
| 947 | 947 | |
| 948 | 948 | const lto = blk: { |
| 949 | | if (options.want_lto) |explicit| { |
| 950 | | if (!use_lld and !options.target.isDarwin()) |
| 949 | if (options.want_lto) |want_lto| { |
| 950 | if (want_lto and !use_lld and !options.target.isDarwin()) |
| 951 | 951 | return error.LtoUnavailableWithoutLld; |
| 952 | | break :blk explicit; |
| 952 | break :blk want_lto; |
| 953 | 953 | } else if (!use_lld) { |
| 954 | | // TODO zig ld LTO support |
| 955 | | // See https://github.com/ziglang/zig/issues/8680 |
| 954 | // zig ld LTO support is tracked by |
| 955 | // https://github.com/ziglang/zig/issues/8680 |
| 956 | 956 | break :blk false; |
| 957 | 957 | } else if (options.c_source_files.len == 0) { |
| 958 | 958 | break :blk false; |