| author | |
| committer | |
| log | f757f0ea59ba3f44377bb11248d4062ce6847e41 |
| tree | b55ec77309da2916e3a60d8311906dfc56b3d108 |
| parent | 35c462caf0c0763c14d0f1303197c86a63c51f03 |
| parent | 0dbf8aaab83d7387568d6387c6cbd263e04c7397 |
5 files changed, 113 insertions(+), 28 deletions(-)
lib/std/crypto/benchmark.zig+1-1| ... | ... | @@ -133,7 +133,7 @@ fn printPad(stdout: var, s: []const u8) !void { |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | pub fn main() !void { |
| 136 | const stdout = &std.io.getStdOut().outStream().stream; | |
| 136 | const stdout = std.io.getStdOut().outStream(); | |
| 137 | 137 | |
| 138 | 138 | var buffer: [1024]u8 = undefined; |
| 139 | 139 | var fixed = std.heap.FixedBufferAllocator.init(buffer[0..]); |
src-self-hosted/clang_options.zig+10| ... | ... | @@ -95,6 +95,16 @@ pub fn flagpd1(name: []const u8) CliArg { |
| 95 | 95 | }; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | /// Shortcut function for initializing a `CliArg` | |
| 99 | pub fn flagpsl(name: []const u8) CliArg { | |
| 100 | return .{ | |
| 101 | .name = name, | |
| 102 | .syntax = .flag, | |
| 103 | .zig_equivalent = .other, | |
| 104 | .psl = true, | |
| 105 | }; | |
| 106 | } | |
| 107 | ||
| 98 | 108 | /// Shortcut function for initializing a `CliArg` |
| 99 | 109 | pub fn joinpd1(name: []const u8) CliArg { |
| 100 | 110 | return .{ |
src-self-hosted/clang_options_data.zig+58-16| ... | ... | @@ -34,10 +34,38 @@ flagpd1("M"), |
| 34 | 34 | .pd2 = false, |
| 35 | 35 | .psl = false, |
| 36 | 36 | }, |
| 37 | flagpd1("MG"), | |
| 38 | flagpd1("MM"), | |
| 39 | flagpd1("MMD"), | |
| 40 | flagpd1("MP"), | |
| 37 | .{ | |
| 38 | .name = "MG", | |
| 39 | .syntax = .flag, | |
| 40 | .zig_equivalent = .dep_file, | |
| 41 | .pd1 = true, | |
| 42 | .pd2 = false, | |
| 43 | .psl = false, | |
| 44 | }, | |
| 45 | .{ | |
| 46 | .name = "MM", | |
| 47 | .syntax = .flag, | |
| 48 | .zig_equivalent = .dep_file, | |
| 49 | .pd1 = true, | |
| 50 | .pd2 = false, | |
| 51 | .psl = false, | |
| 52 | }, | |
| 53 | .{ | |
| 54 | .name = "MMD", | |
| 55 | .syntax = .flag, | |
| 56 | .zig_equivalent = .dep_file, | |
| 57 | .pd1 = true, | |
| 58 | .pd2 = false, | |
| 59 | .psl = false, | |
| 60 | }, | |
| 61 | .{ | |
| 62 | .name = "MP", | |
| 63 | .syntax = .flag, | |
| 64 | .zig_equivalent = .dep_file, | |
| 65 | .pd1 = true, | |
| 66 | .pd2 = false, | |
| 67 | .psl = false, | |
| 68 | }, | |
| 41 | 69 | .{ |
| 42 | 70 | .name = "MV", |
| 43 | 71 | .syntax = .flag, |
| ... | ... | @@ -517,14 +545,7 @@ sepd1("Zlinker-input"), |
| 517 | 545 | .pd2 = false, |
| 518 | 546 | .psl = true, |
| 519 | 547 | }, |
| 520 | .{ | |
| 521 | .name = "MT", | |
| 522 | .syntax = .flag, | |
| 523 | .zig_equivalent = .other, | |
| 524 | .pd1 = true, | |
| 525 | .pd2 = false, | |
| 526 | .psl = true, | |
| 527 | }, | |
| 548 | flagpsl("MT"), | |
| 528 | 549 | .{ |
| 529 | 550 | .name = "MTd", |
| 530 | 551 | .syntax = .flag, |
| ... | ... | @@ -5463,9 +5484,30 @@ joinpd1("G="), |
| 5463 | 5484 | .pd2 = false, |
| 5464 | 5485 | .psl = false, |
| 5465 | 5486 | }, |
| 5466 | jspd1("MJ"), | |
| 5467 | jspd1("MQ"), | |
| 5468 | jspd1("MT"), | |
| 5487 | .{ | |
| 5488 | .name = "MJ", | |
| 5489 | .syntax = .joined_or_separate, | |
| 5490 | .zig_equivalent = .dep_file, | |
| 5491 | .pd1 = true, | |
| 5492 | .pd2 = false, | |
| 5493 | .psl = false, | |
| 5494 | }, | |
| 5495 | .{ | |
| 5496 | .name = "MQ", | |
| 5497 | .syntax = .joined_or_separate, | |
| 5498 | .zig_equivalent = .dep_file, | |
| 5499 | .pd1 = true, | |
| 5500 | .pd2 = false, | |
| 5501 | .psl = false, | |
| 5502 | }, | |
| 5503 | .{ | |
| 5504 | .name = "MT", | |
| 5505 | .syntax = .joined_or_separate, | |
| 5506 | .zig_equivalent = .dep_file, | |
| 5507 | .pd1 = true, | |
| 5508 | .pd2 = false, | |
| 5509 | .psl = false, | |
| 5510 | }, | |
| 5469 | 5511 | .{ |
| 5470 | 5512 | .name = "AI", |
| 5471 | 5513 | .syntax = .joined_or_separate, |
| ... | ... | @@ -5589,7 +5631,7 @@ jspd1("MT"), |
| 5589 | 5631 | .{ |
| 5590 | 5632 | .name = "MP", |
| 5591 | 5633 | .syntax = .joined, |
| 5592 | .zig_equivalent = .other, | |
| 5634 | .zig_equivalent = .dep_file, | |
| 5593 | 5635 | .pd1 = true, |
| 5594 | 5636 | .pd2 = false, |
| 5595 | 5637 | .psl = true, |
test/tests.zig+8-10| ... | ... | @@ -152,17 +152,15 @@ const test_targets = blk: { |
| 152 | 152 | .link_libc = true, |
| 153 | 153 | }, |
| 154 | 154 | |
| 155 | // TODO disabled only because the CI server has such an old qemu that | |
| 156 | // qemu-riscv64 isn't available :( | |
| 157 | //TestTarget{ | |
| 158 | // .target = .{ | |
| 159 | // .cpu_arch = .riscv64, | |
| 160 | // .os_tag = .linux, | |
| 161 | // .abi = .none, | |
| 162 | // }, | |
| 163 | //}, | |
| 155 | TestTarget{ | |
| 156 | .target = .{ | |
| 157 | .cpu_arch = .riscv64, | |
| 158 | .os_tag = .linux, | |
| 159 | .abi = .none, | |
| 160 | }, | |
| 161 | }, | |
| 164 | 162 | |
| 165 | // https://github.com/ziglang/zig/issues/4485 | |
| 163 | // https://github.com/ziglang/zig/issues/4863 | |
| 166 | 164 | //TestTarget{ |
| 167 | 165 | // .target = .{ |
| 168 | 166 | // .cpu_arch = .riscv64, |
tools/update_clang_options.zig+36-1| ... | ... | @@ -206,6 +206,34 @@ const known_options = [_]KnownOpt{ |
| 206 | 206 | .name = "MF", |
| 207 | 207 | .ident = "dep_file", |
| 208 | 208 | }, |
| 209 | .{ | |
| 210 | .name = "MT", | |
| 211 | .ident = "dep_file", | |
| 212 | }, | |
| 213 | .{ | |
| 214 | .name = "MG", | |
| 215 | .ident = "dep_file", | |
| 216 | }, | |
| 217 | .{ | |
| 218 | .name = "MJ", | |
| 219 | .ident = "dep_file", | |
| 220 | }, | |
| 221 | .{ | |
| 222 | .name = "MM", | |
| 223 | .ident = "dep_file", | |
| 224 | }, | |
| 225 | .{ | |
| 226 | .name = "MMD", | |
| 227 | .ident = "dep_file", | |
| 228 | }, | |
| 229 | .{ | |
| 230 | .name = "MP", | |
| 231 | .ident = "dep_file", | |
| 232 | }, | |
| 233 | .{ | |
| 234 | .name = "MQ", | |
| 235 | .ident = "dep_file", | |
| 236 | }, | |
| 209 | 237 | .{ |
| 210 | 238 | .name = "F", |
| 211 | 239 | .ident = "framework_dir", |
| ... | ... | @@ -336,7 +364,12 @@ pub fn main() anyerror!void { |
| 336 | 364 | } |
| 337 | 365 | const syntax = objSyntax(obj); |
| 338 | 366 | |
| 339 | if (knownOption(name)) |ident| { | |
| 367 | if (std.mem.eql(u8, name, "MT") and syntax == .flag) { | |
| 368 | // `-MT foo` is ambiguous because there is also an -MT flag | |
| 369 | // The canonical way to specify the flag is with `/MT` and so we make this | |
| 370 | // the only way. | |
| 371 | try stdout.print("flagpsl(\"{}\"),\n", .{name}); | |
| 372 | } else if (knownOption(name)) |ident| { | |
| 340 | 373 | try stdout.print( |
| 341 | 374 | \\.{{ |
| 342 | 375 | \\ .name = "{}", |
| ... | ... | @@ -350,6 +383,8 @@ pub fn main() anyerror!void { |
| 350 | 383 | , .{ name, syntax, ident, pd1, pd2, pslash }); |
| 351 | 384 | } else if (pd1 and !pd2 and !pslash and syntax == .flag) { |
| 352 | 385 | try stdout.print("flagpd1(\"{}\"),\n", .{name}); |
| 386 | } else if (!pd1 and !pd2 and pslash and syntax == .flag) { | |
| 387 | try stdout.print("flagpsl(\"{}\"),\n", .{name}); | |
| 353 | 388 | } else if (pd1 and !pd2 and !pslash and syntax == .joined) { |
| 354 | 389 | try stdout.print("joinpd1(\"{}\"),\n", .{name}); |
| 355 | 390 | } else if (pd1 and !pd2 and !pslash and syntax == .joined_or_separate) { |