Merge branch 'master' into feature-file-locks
commit
f757f0ea59
|
@ -133,7 +133,7 @@ fn printPad(stdout: var, s: []const u8) !void {
|
|||
}
|
||||
|
||||
pub fn main() !void {
|
||||
const stdout = &std.io.getStdOut().outStream().stream;
|
||||
const stdout = std.io.getStdOut().outStream();
|
||||
|
||||
var buffer: [1024]u8 = undefined;
|
||||
var fixed = std.heap.FixedBufferAllocator.init(buffer[0..]);
|
||||
|
|
|
@ -95,6 +95,16 @@ pub fn flagpd1(name: []const u8) CliArg {
|
|||
};
|
||||
}
|
||||
|
||||
/// Shortcut function for initializing a `CliArg`
|
||||
pub fn flagpsl(name: []const u8) CliArg {
|
||||
return .{
|
||||
.name = name,
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .other,
|
||||
.psl = true,
|
||||
};
|
||||
}
|
||||
|
||||
/// Shortcut function for initializing a `CliArg`
|
||||
pub fn joinpd1(name: []const u8) CliArg {
|
||||
return .{
|
||||
|
|
|
@ -34,10 +34,38 @@ flagpd1("M"),
|
|||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
flagpd1("MG"),
|
||||
flagpd1("MM"),
|
||||
flagpd1("MMD"),
|
||||
flagpd1("MP"),
|
||||
.{
|
||||
.name = "MG",
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MM",
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MMD",
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MP",
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MV",
|
||||
.syntax = .flag,
|
||||
|
@ -517,14 +545,7 @@ sepd1("Zlinker-input"),
|
|||
.pd2 = false,
|
||||
.psl = true,
|
||||
},
|
||||
.{
|
||||
.name = "MT",
|
||||
.syntax = .flag,
|
||||
.zig_equivalent = .other,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = true,
|
||||
},
|
||||
flagpsl("MT"),
|
||||
.{
|
||||
.name = "MTd",
|
||||
.syntax = .flag,
|
||||
|
@ -5463,9 +5484,30 @@ joinpd1("G="),
|
|||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
jspd1("MJ"),
|
||||
jspd1("MQ"),
|
||||
jspd1("MT"),
|
||||
.{
|
||||
.name = "MJ",
|
||||
.syntax = .joined_or_separate,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MQ",
|
||||
.syntax = .joined_or_separate,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "MT",
|
||||
.syntax = .joined_or_separate,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "AI",
|
||||
.syntax = .joined_or_separate,
|
||||
|
@ -5589,7 +5631,7 @@ jspd1("MT"),
|
|||
.{
|
||||
.name = "MP",
|
||||
.syntax = .joined,
|
||||
.zig_equivalent = .other,
|
||||
.zig_equivalent = .dep_file,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = true,
|
||||
|
|
|
@ -152,17 +152,15 @@ const test_targets = blk: {
|
|||
.link_libc = true,
|
||||
},
|
||||
|
||||
// TODO disabled only because the CI server has such an old qemu that
|
||||
// qemu-riscv64 isn't available :(
|
||||
//TestTarget{
|
||||
// .target = .{
|
||||
// .cpu_arch = .riscv64,
|
||||
// .os_tag = .linux,
|
||||
// .abi = .none,
|
||||
// },
|
||||
//},
|
||||
TestTarget{
|
||||
.target = .{
|
||||
.cpu_arch = .riscv64,
|
||||
.os_tag = .linux,
|
||||
.abi = .none,
|
||||
},
|
||||
},
|
||||
|
||||
// https://github.com/ziglang/zig/issues/4485
|
||||
// https://github.com/ziglang/zig/issues/4863
|
||||
//TestTarget{
|
||||
// .target = .{
|
||||
// .cpu_arch = .riscv64,
|
||||
|
|
|
@ -206,6 +206,34 @@ const known_options = [_]KnownOpt{
|
|||
.name = "MF",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MT",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MG",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MJ",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MM",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MMD",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MP",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "MQ",
|
||||
.ident = "dep_file",
|
||||
},
|
||||
.{
|
||||
.name = "F",
|
||||
.ident = "framework_dir",
|
||||
|
@ -336,7 +364,12 @@ pub fn main() anyerror!void {
|
|||
}
|
||||
const syntax = objSyntax(obj);
|
||||
|
||||
if (knownOption(name)) |ident| {
|
||||
if (std.mem.eql(u8, name, "MT") and syntax == .flag) {
|
||||
// `-MT foo` is ambiguous because there is also an -MT flag
|
||||
// The canonical way to specify the flag is with `/MT` and so we make this
|
||||
// the only way.
|
||||
try stdout.print("flagpsl(\"{}\"),\n", .{name});
|
||||
} else if (knownOption(name)) |ident| {
|
||||
try stdout.print(
|
||||
\\.{{
|
||||
\\ .name = "{}",
|
||||
|
@ -350,6 +383,8 @@ pub fn main() anyerror!void {
|
|||
, .{ name, syntax, ident, pd1, pd2, pslash });
|
||||
} else if (pd1 and !pd2 and !pslash and syntax == .flag) {
|
||||
try stdout.print("flagpd1(\"{}\"),\n", .{name});
|
||||
} else if (!pd1 and !pd2 and pslash and syntax == .flag) {
|
||||
try stdout.print("flagpsl(\"{}\"),\n", .{name});
|
||||
} else if (pd1 and !pd2 and !pslash and syntax == .joined) {
|
||||
try stdout.print("joinpd1(\"{}\"),\n", .{name});
|
||||
} else if (pd1 and !pd2 and !pslash and syntax == .joined_or_separate) {
|
||||
|
|
Loading…
Reference in New Issue