mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Revert "adding static and dynamic ZigEquivalent
enums so that we can branch to set `link_mode` properly when we iterate over the clang arguments. also replaced `dynamic` flag in clang_options_data.zig with proper definition similarly to `static`." This reverts commit 6af0eeb58d1d220d407ce4c463eaeb25b35f2761. This change needs more careful consideration. It regressed zig-bootstrap due to cmake passing `-static -lkernel32` and zig failing with error.UnableToStaticLink. See https://github.com/ziglang/zig-bootstrap/issues/134
This commit is contained in:
parent
b120c819db
commit
4f9345d20b
@ -2480,14 +2480,7 @@ flagpd1("dwarf-ext-refs"),
|
|||||||
},
|
},
|
||||||
sepd1("dylib_file"),
|
sepd1("dylib_file"),
|
||||||
flagpd1("dylinker"),
|
flagpd1("dylinker"),
|
||||||
.{
|
flagpd1("dynamic"),
|
||||||
.name = "dynamic",
|
|
||||||
.syntax = .flag,
|
|
||||||
.zig_equivalent = .dynamic,
|
|
||||||
.pd1 = true,
|
|
||||||
.pd2 = false,
|
|
||||||
.psl = false,
|
|
||||||
},
|
|
||||||
.{
|
.{
|
||||||
.name = "dynamiclib",
|
.name = "dynamiclib",
|
||||||
.syntax = .flag,
|
.syntax = .flag,
|
||||||
@ -5041,7 +5034,7 @@ sepd1("stack-usage-file"),
|
|||||||
.{
|
.{
|
||||||
.name = "static",
|
.name = "static",
|
||||||
.syntax = .flag,
|
.syntax = .flag,
|
||||||
.zig_equivalent = .static,
|
.zig_equivalent = .other,
|
||||||
.pd1 = true,
|
.pd1 = true,
|
||||||
.pd2 = true,
|
.pd2 = true,
|
||||||
.psl = false,
|
.psl = false,
|
||||||
|
|||||||
@ -1653,8 +1653,6 @@ fn buildOutputType(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.dynamic => link_mode = .Dynamic,
|
|
||||||
.static => link_mode = .Static,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Parse linker args.
|
// Parse linker args.
|
||||||
@ -4687,8 +4685,6 @@ pub const ClangArgIterator = struct {
|
|||||||
weak_framework,
|
weak_framework,
|
||||||
headerpad_max_install_names,
|
headerpad_max_install_names,
|
||||||
compress_debug_sections,
|
compress_debug_sections,
|
||||||
dynamic,
|
|
||||||
static,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Args = struct {
|
const Args = struct {
|
||||||
|
|||||||
@ -492,14 +492,6 @@ const known_options = [_]KnownOpt{
|
|||||||
.name = "compress-debug-sections=",
|
.name = "compress-debug-sections=",
|
||||||
.ident = "compress_debug_sections",
|
.ident = "compress_debug_sections",
|
||||||
},
|
},
|
||||||
.{
|
|
||||||
.name = "dynamic",
|
|
||||||
.ident = "dynamic",
|
|
||||||
},
|
|
||||||
.{
|
|
||||||
.name = "static",
|
|
||||||
.ident = "static",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const blacklisted_options = [_][]const u8{};
|
const blacklisted_options = [_][]const u8{};
|
||||||
@ -806,7 +798,7 @@ fn objSyntax(obj: *json.ObjectMap) ?Syntax {
|
|||||||
} else if (std.mem.eql(u8, superclass, "CLRemainingArgsJoined")) {
|
} else if (std.mem.eql(u8, superclass, "CLRemainingArgsJoined")) {
|
||||||
return .remaining_args_joined;
|
return .remaining_args_joined;
|
||||||
} else if (std.mem.eql(u8, superclass, "MultiArg")) {
|
} else if (std.mem.eql(u8, superclass, "MultiArg")) {
|
||||||
return Syntax{ .multi_arg = num_args };
|
return .{ .multi_arg = num_args };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const name = obj.get("Name").?.String;
|
const name = obj.get("Name").?.String;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user