mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
rename omit_pkg_fetching_code to only_core_functionality
No functional changes. This renames an internal build option to better reflect how it is used.
This commit is contained in:
parent
fea6157102
commit
f52189834c
4 changed files with 10 additions and 10 deletions
|
|
@ -197,7 +197,7 @@ pub fn build(b: *std.Build) !void {
|
||||||
exe_options.addOption(bool, "llvm_has_xtensa", llvm_has_xtensa);
|
exe_options.addOption(bool, "llvm_has_xtensa", llvm_has_xtensa);
|
||||||
exe_options.addOption(bool, "force_gpa", force_gpa);
|
exe_options.addOption(bool, "force_gpa", force_gpa);
|
||||||
exe_options.addOption(bool, "only_c", only_c);
|
exe_options.addOption(bool, "only_c", only_c);
|
||||||
exe_options.addOption(bool, "omit_pkg_fetching_code", only_c);
|
exe_options.addOption(bool, "only_core_functionality", only_c);
|
||||||
|
|
||||||
if (link_libc) {
|
if (link_libc) {
|
||||||
exe.linkLibC();
|
exe.linkLibC();
|
||||||
|
|
@ -353,7 +353,7 @@ pub fn build(b: *std.Build) !void {
|
||||||
test_cases_options.addOption(bool, "llvm_has_xtensa", llvm_has_xtensa);
|
test_cases_options.addOption(bool, "llvm_has_xtensa", llvm_has_xtensa);
|
||||||
test_cases_options.addOption(bool, "force_gpa", force_gpa);
|
test_cases_options.addOption(bool, "force_gpa", force_gpa);
|
||||||
test_cases_options.addOption(bool, "only_c", only_c);
|
test_cases_options.addOption(bool, "only_c", only_c);
|
||||||
test_cases_options.addOption(bool, "omit_pkg_fetching_code", true);
|
test_cases_options.addOption(bool, "only_core_functionality", true);
|
||||||
test_cases_options.addOption(bool, "enable_qemu", b.enable_qemu);
|
test_cases_options.addOption(bool, "enable_qemu", b.enable_qemu);
|
||||||
test_cases_options.addOption(bool, "enable_wine", b.enable_wine);
|
test_cases_options.addOption(bool, "enable_wine", b.enable_wine);
|
||||||
test_cases_options.addOption(bool, "enable_wasmtime", b.enable_wasmtime);
|
test_cases_options.addOption(bool, "enable_wasmtime", b.enable_wasmtime);
|
||||||
|
|
@ -505,7 +505,7 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
|
||||||
exe_options.addOption(bool, "enable_tracy_callstack", false);
|
exe_options.addOption(bool, "enable_tracy_callstack", false);
|
||||||
exe_options.addOption(bool, "enable_tracy_allocation", false);
|
exe_options.addOption(bool, "enable_tracy_allocation", false);
|
||||||
exe_options.addOption(bool, "value_tracing", false);
|
exe_options.addOption(bool, "value_tracing", false);
|
||||||
exe_options.addOption(bool, "omit_pkg_fetching_code", true);
|
exe_options.addOption(bool, "only_core_functionality", true);
|
||||||
|
|
||||||
const run_opt = b.addSystemCommand(&.{
|
const run_opt = b.addSystemCommand(&.{
|
||||||
"wasm-opt",
|
"wasm-opt",
|
||||||
|
|
|
||||||
|
|
@ -2056,7 +2056,7 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!build_options.only_c and !build_options.omit_pkg_fetching_code) {
|
if (!build_options.only_c and !build_options.only_core_functionality) {
|
||||||
if (comp.emit_docs) |doc_location| {
|
if (comp.emit_docs) |doc_location| {
|
||||||
if (comp.bin_file.options.module) |module| {
|
if (comp.bin_file.options.module) |module| {
|
||||||
var autodoc = Autodoc.init(module, doc_location);
|
var autodoc = Autodoc.init(module, doc_location);
|
||||||
|
|
|
||||||
10
src/main.zig
10
src/main.zig
|
|
@ -292,7 +292,7 @@ pub fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
|
||||||
mem.eql(u8, cmd, "wasm-ld"))
|
mem.eql(u8, cmd, "wasm-ld"))
|
||||||
{
|
{
|
||||||
return process.exit(try lldMain(arena, args, true));
|
return process.exit(try lldMain(arena, args, true));
|
||||||
} else if (build_options.omit_pkg_fetching_code) {
|
} else if (build_options.only_core_functionality) {
|
||||||
@panic("only a few subcommands are supported in a zig2.c build");
|
@panic("only a few subcommands are supported in a zig2.c build");
|
||||||
} else if (mem.eql(u8, cmd, "cc")) {
|
} else if (mem.eql(u8, cmd, "cc")) {
|
||||||
return buildOutputType(gpa, arena, args, .cc);
|
return buildOutputType(gpa, arena, args, .cc);
|
||||||
|
|
@ -680,7 +680,7 @@ const ArgMode = union(enum) {
|
||||||
|
|
||||||
/// Avoid dragging networking into zig2.c because it adds dependencies on some
|
/// Avoid dragging networking into zig2.c because it adds dependencies on some
|
||||||
/// linker symbols that are annoying to satisfy while bootstrapping.
|
/// linker symbols that are annoying to satisfy while bootstrapping.
|
||||||
const Ip4Address = if (build_options.omit_pkg_fetching_code) void else std.net.Ip4Address;
|
const Ip4Address = if (build_options.only_core_functionality) void else std.net.Ip4Address;
|
||||||
|
|
||||||
const Listen = union(enum) {
|
const Listen = union(enum) {
|
||||||
none,
|
none,
|
||||||
|
|
@ -1179,7 +1179,7 @@ fn buildOutputType(
|
||||||
if (mem.eql(u8, next_arg, "-")) {
|
if (mem.eql(u8, next_arg, "-")) {
|
||||||
listen = .stdio;
|
listen = .stdio;
|
||||||
} else {
|
} else {
|
||||||
if (build_options.omit_pkg_fetching_code) unreachable;
|
if (build_options.only_core_functionality) unreachable;
|
||||||
// example: --listen 127.0.0.1:9000
|
// example: --listen 127.0.0.1:9000
|
||||||
var it = std.mem.split(u8, next_arg, ":");
|
var it = std.mem.split(u8, next_arg, ":");
|
||||||
const host = it.next().?;
|
const host = it.next().?;
|
||||||
|
|
@ -3268,7 +3268,7 @@ fn buildOutputType(
|
||||||
return cleanExit();
|
return cleanExit();
|
||||||
},
|
},
|
||||||
.ip4 => |ip4_addr| {
|
.ip4 => |ip4_addr| {
|
||||||
if (build_options.omit_pkg_fetching_code) unreachable;
|
if (build_options.only_core_functionality) unreachable;
|
||||||
|
|
||||||
var server = std.net.StreamServer.init(.{
|
var server = std.net.StreamServer.init(.{
|
||||||
.reuse_address = true,
|
.reuse_address = true,
|
||||||
|
|
@ -4415,7 +4415,7 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
|
||||||
.root_src_directory = build_directory,
|
.root_src_directory = build_directory,
|
||||||
.root_src_path = build_zig_basename,
|
.root_src_path = build_zig_basename,
|
||||||
};
|
};
|
||||||
if (!build_options.omit_pkg_fetching_code) {
|
if (!build_options.only_core_functionality) {
|
||||||
var http_client: std.http.Client = .{ .allocator = gpa };
|
var http_client: std.http.Client = .{ .allocator = gpa };
|
||||||
defer http_client.deinit();
|
defer http_client.deinit();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@ pub const have_stage1 = false;
|
||||||
pub const skip_non_native = false;
|
pub const skip_non_native = false;
|
||||||
pub const only_c = false;
|
pub const only_c = false;
|
||||||
pub const force_gpa = false;
|
pub const force_gpa = false;
|
||||||
pub const omit_pkg_fetching_code = true;
|
pub const only_core_functionality = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue