diff --git a/lib/compiler/Maker/Step/Run.zig b/lib/compiler/Maker/Step/Run.zig index c927d6d4af90ed114483a0b53504cf3c33a5fd7b..c0bb82cdef3799653b45090045f2c3d6105a5da6 100644 --- a/lib/compiler/Maker/Step/Run.zig +++ b/lib/compiler/Maker/Step/Run.zig @@ -177,9 +177,6 @@ pub fn make( man.hash.addListOfBytes(run_args); } }, - .cc_args => { - @panic("TODO Run make cc_args"); - }, } } diff --git a/lib/compiler/configurer.zig b/lib/compiler/configurer.zig index 490d0e9df9bb32a42d23f8ec3a9aeb428e3cf766..e16e9caac769b7c9eb53d315bbd0f9d47adb52eb 100644 --- a/lib/compiler/configurer.zig +++ b/lib/compiler/configurer.zig @@ -313,8 +313,6 @@ const Serialize = struct { .producer = true, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = null }, @@ -322,7 +320,6 @@ const Serialize = struct { .path = .{ .value = null }, .producer = .{ .value = stepIndex(s, &a.artifact.step) }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, }, .lazy_path => |a| .{ .flags = .{ @@ -334,8 +331,6 @@ const Serialize = struct { .producer = false, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = null }, @@ -343,7 +338,6 @@ const Serialize = struct { .path = .{ .value = try addLazyPath(s, a.lazy_path) }, .producer = .{ .value = null }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, }, .decorated_directory => |a| .{ .flags = .{ @@ -355,8 +349,6 @@ const Serialize = struct { .producer = false, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = if (a.suffix.len != 0) try wc.addString(a.suffix) else null }, @@ -364,7 +356,6 @@ const Serialize = struct { .path = .{ .value = try addLazyPath(s, a.lazy_path) }, .producer = .{ .value = null }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, }, .file_content => |a| .{ .flags = .{ @@ -376,8 +367,6 @@ const Serialize = struct { .producer = false, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = null }, @@ -385,7 +374,6 @@ const Serialize = struct { .path = .{ .value = try addLazyPath(s, a.lazy_path) }, .producer = .{ .value = null }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, }, .bytes => |a| .{ .flags = .{ @@ -397,8 +385,6 @@ const Serialize = struct { .producer = false, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = try wc.addString(a) }, .suffix = .{ .value = null }, @@ -406,7 +392,6 @@ const Serialize = struct { .path = .{ .value = null }, .producer = .{ .value = null }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, }, .output_file, .output_file_dep => |a, tag| .{ .flags = .{ @@ -418,8 +403,6 @@ const Serialize = struct { .producer = false, .generated = true, .dep_file = tag == .output_file_dep, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = null }, @@ -427,7 +410,6 @@ const Serialize = struct { .path = .{ .value = null }, .producer = .{ .value = null }, .generated = .{ .value = a.generated_file }, - .target_query = .{ .value = null }, }, .output_directory => |a| .{ .flags = .{ @@ -439,8 +421,6 @@ const Serialize = struct { .producer = false, .generated = true, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = if (a.prefix.len != 0) try wc.addString(a.prefix) else null }, .suffix = .{ .value = null }, @@ -448,7 +428,6 @@ const Serialize = struct { .path = .{ .value = null }, .producer = .{ .value = null }, .generated = .{ .value = a.generated_file }, - .target_query = .{ .value = null }, }, .passthru => .{ .flags = .{ @@ -460,8 +439,6 @@ const Serialize = struct { .producer = false, .generated = false, .dep_file = false, - .target_query = false, - .link_libc = false, }, .prefix = .{ .value = null }, .suffix = .{ .value = null }, @@ -469,28 +446,6 @@ const Serialize = struct { .path = .{ .value = null }, .producer = .{ .value = null }, .generated = .{ .value = null }, - .target_query = .{ .value = null }, - }, - .cc_args => |a| .{ - .flags = .{ - .tag = .cc_args, - .prefix = false, - .suffix = false, - .basename = false, - .path = false, - .producer = false, - .generated = false, - .dep_file = false, - .target_query = a.target_query != .none, - .link_libc = a.link_libc, - }, - .prefix = .{ .value = null }, - .suffix = .{ .value = null }, - .basename = .{ .value = null }, - .path = .{ .value = null }, - .producer = .{ .value = null }, - .generated = .{ .value = null }, - .target_query = .{ .value = a.target_query.unwrap() }, }, }); } diff --git a/lib/std/Build/Configuration.zig b/lib/std/Build/Configuration.zig index cfa156a8229cad2b8bed20b5b27de351fc47d193..b96e7922c5ac98db8aa1da14ab4a137ec5410293 100644 --- a/lib/std/Build/Configuration.zig +++ b/lib/std/Build/Configuration.zig @@ -586,7 +586,6 @@ pub const Step = extern struct { /// Always a compile step. producer: Storage.FlagOptional(.flags, .producer, Step.Index), generated: Storage.FlagOptional(.flags, .generated, GeneratedFileIndex), - target_query: Storage.FlagOptional(.flags, .target_query, TargetQuery.Index), pub const Flags = packed struct(u32) { tag: Arg.Tag, @@ -597,9 +596,7 @@ pub const Step = extern struct { producer: bool, generated: bool, dep_file: bool, - target_query: bool, - link_libc: bool, - _: u19 = 0, + _: u21 = 0, }; pub const Tag = enum(u4) { @@ -613,7 +610,6 @@ pub const Step = extern struct { output_file, output_directory, passthru, - cc_args, }; pub const Index = IndexType(@This()); diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index c2c5a4f7a38e8217d7e79e4414abbab5d3451b4f..35699051fbfd511c399cb7033e613abebd9cf9d5 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -143,13 +143,6 @@ pub const Arg = union(enum) { output_directory: *Output, /// The arguments passed after "--" on the "zig build" CLI. passthru, - /// Adds standard "-isystem" and "-iframework" arguments corresponding to the libc of the target. - cc_args: CcArgs, -}; - -pub const CcArgs = struct { - link_libc: bool, - target_query: Configuration.TargetQuery.OptionalIndex, }; pub const PrefixedArtifact = struct { @@ -536,22 +529,6 @@ pub fn addPassthruArgs(run: *Run) void { run.argv.append(arena, .passthru) catch @panic("OOM"); } -pub const AddCcArgs = struct { - link_libc: bool = false, - target_query: ?*const std.Target.Query = null, -}; - -/// Appends C compiler flags for the target and for including libc. -pub fn addCcArgs(run: *Run, options: AddCcArgs) void { - const graph = run.step.owner.graph; - const arena = graph.arena; - const wc = &graph.wip_configuration; - run.argv.append(arena, .{ .cc_args = .{ - .link_libc = options.link_libc, - .target_query = if (options.target_query) |q| wc.addTargetQuery(q) catch @panic("OOM") else .none, - } }) catch @panic("OOM"); -} - pub fn setStdIn(run: *Run, stdin: StdIn) void { switch (stdin) { .lazy_path => |lazy_path| lazy_path.addStepDependencies(&run.step),