mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Remove std.Build.anonymousDependency
This commit is contained in:
parent
5d5e89aa8d
commit
ef90d3af54
@ -1973,25 +1973,6 @@ pub fn dependencyFromBuildZig(
|
||||
debug.panic("'{}' is not a build.zig struct of a dependecy in '{s}'", .{ build_zig, full_path });
|
||||
}
|
||||
|
||||
pub fn anonymousDependency(
|
||||
b: *Build,
|
||||
/// The path to the directory containing the dependency's build.zig file,
|
||||
/// relative to the current package's build.zig.
|
||||
relative_build_root: []const u8,
|
||||
/// A direct `@import` of the build.zig of the dependency.
|
||||
comptime build_zig: type,
|
||||
args: anytype,
|
||||
) *Dependency {
|
||||
const arena = b.allocator;
|
||||
const build_root = b.build_root.join(arena, &.{relative_build_root}) catch @panic("OOM");
|
||||
const name = arena.dupe(u8, relative_build_root) catch @panic("OOM");
|
||||
for (name) |*byte| switch (byte.*) {
|
||||
'/', '\\' => byte.* = '.',
|
||||
else => continue,
|
||||
};
|
||||
return dependencyInner(b, name, build_root, build_zig, "anonymous", &.{}, args);
|
||||
}
|
||||
|
||||
fn userValuesAreSame(lhs: UserValue, rhs: UserValue) bool {
|
||||
switch (lhs) {
|
||||
.flag => {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user