authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-02-19 15:03:43-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:34-07:00
log174532c78e254449c61d1729f8761b30b6f05eff
tree2f59ec0717aa30470a7690269d40b557fd686c50
parent959103c3fd544abe06f32b279a6ebd1a3cd1f61b

std.build.Configuration: sketch a data layout idea


1 files changed, 35 insertions(+), 34 deletions(-)

lib/std/zig/Configuration.zig+35-34
...@@ -577,39 +577,8 @@ pub const Step = extern struct {...@@ -577,39 +577,8 @@ pub const Step = extern struct {
577 };577 };
578578
579 /// Trailing:579 /// Trailing:
580 /// * filters_len: u32, // if flag is set580 /// * exact_match: String, // if expected_compile_errors is contains, starts_with, or stderr_contains
581 /// * exec_cmd_args_len: u32, // if flag is set581 /// * test_runner: LazyPath, // if test_runner_mode is not default
582 /// * installed_headers_len: u32, // if flag is set
583 /// * force_undefined_symbols_len: u32, // if flag is set
584 /// * exacts_len: u32 if expected_compile_errors is exact
585 /// * filter: String for each filters_len
586 /// * exec_cmd_arg: String for each exec_cmd_args_len
587 /// * InstalledHeader for each installed_headers_len
588 /// * force_undefined_symbol: String for each force_undefined_symbols_len
589 /// * String for each exacts_len
590 /// * linker_script: LazyPath if flag is set
591 /// * version_script: LazyPath if flag is set
592 /// * zig_lib_dir: LazyPath if flag is set
593 /// * libc_file: LazyPath if flag is set
594 /// * test_runner: LazyPath if test_runner_mode is not default
595 /// * win32_manifest: LazyPath if flag is set
596 /// * win32_module_definition: LazyPath if flag is set
597 /// * entitlements: LazyPath if flag is set
598 /// * version: String if flag is set (semantic version string)
599 /// * entry: String if entry is symbol
600 /// * install_name: String if flag is set
601 /// * String if expected_compile_errors is contains, starts_with, or stderr_contains
602 /// * initial_memory: u64 if flag is set
603 /// * max_memory: u64 if flag is set
604 /// * global_base: u64 if flag is set
605 /// * image_base: u64 if flag is set
606 /// * link_z_common_page_size if flag is set
607 /// * link_z_max_page_size if flag is set
608 /// * pagezero_size if flag is set
609 /// * stack_size if flag is set
610 /// * headerpad_size if flag is set
611 /// * error_limit if flag is set
612 /// * Hexstring if build_id is hexstring
613 pub const Compile = struct {582 pub const Compile = struct {
614 flags: @This().Flags,583 flags: @This().Flags,
615 flags2: Flags2,584 flags2: Flags2,
...@@ -619,6 +588,35 @@ pub const Step = extern struct {...@@ -619,6 +588,35 @@ pub const Step = extern struct {
619 root_module: Module.Index,588 root_module: Module.Index,
620 root_name: String,589 root_name: String,
621590
591 trailing: Trailing(struct {
592 filters: FlagLengthPrefixedList(.flags, .filters_len, String),
593 exec_cmd_args: FlagLengthPrefixedList(.flags, .exec_cmd_args_len, u32),
594 installed_headers: FlagLengthPrefixedList(.flags, .installed_headers_len, InstalledHeader),
595 force_undefined_symbols: FlagLengthPrefixedList(.flags, .force_undefined_symbols_len, String),
596 exacts: EnumConditionalPrefixedList(.flags4, .expected_compile_errors, .exact, String),
597 linker_script: FlagOptional(.flags4, .linker_script, LazyPath),
598 version_script: FlagOptional(.flags4, .version_script, LazyPath),
599 zig_lib_dir: FlagOptional(.flags3, .zig_lib_dir, LazyPath),
600 libc_file: FlagOptional(.flags4, .libc_file, LazyPath),
601 win32_manifest: FlagOptional(.flags3, .win32_manifest, LazyPath),
602 win32_module_definition: FlagOptional(.flags3, .win32_module_definition, LazyPath),
603 entitlements: FlagOptional(.flags4, .entitlements, LazyPath),
604 version: FlagOptional(.flags3, .version, String), // semantic version string
605 entry: EnumOptional(.flags3, .entry, .symbol, String),
606 install_name: FlagOptional(.flags4, .install_name, String),
607 initial_memory: FlagOptional(.flags3, .initial_memory, u64),
608 max_memory: FlagOptional(.flags3, .max_memory, u64),
609 global_base: FlagOptional(.flags3, .global_base, u64),
610 image_base: FlagOptional(.flags3, .image_base, u64),
611 link_z_common_page_size: FlagOptional(.flags4, .link_z_common_page_size, u64),
612 link_z_max_page_size: FlagOptional(.flags4, .link_z_max_page_size, u64),
613 pagezero_size: FlagOptional(.flags4, .pagezero_size, u64),
614 stack_size: FlagOptional(.flags4, .stack_size, u64),
615 headerpad_size: FlagOptional(.flags4, .headerpad_size, u32),
616 error_limit: FlagOptional(.flags4, .error_limit, u32),
617 build_id: EnumOptional(.flags3, .build_id, .hexstring, Hexstring),
618 }),
619
622 pub const ExpectedCompileErrors = enum(u3) { contains, exact, starts_with, stderr_contains, none };620 pub const ExpectedCompileErrors = enum(u3) { contains, exact, starts_with, stderr_contains, none };
623 pub const TestRunnerMode = enum(u2) { default, simple, server };621 pub const TestRunnerMode = enum(u2) { default, simple, server };
624 pub const Entry = enum(u2) { default, disabled, enabled, symbol_name };622 pub const Entry = enum(u2) { default, disabled, enabled, symbol_name };
...@@ -805,7 +803,10 @@ pub const Step = extern struct {...@@ -805,7 +803,10 @@ pub const Step = extern struct {
805 error_limit: bool,803 error_limit: bool,
806 install_name: bool,804 install_name: bool,
807 entitlements: bool,805 entitlements: bool,
808 _: u23 = 0,806 expected_compile_errors: ExpectedCompileErrors,
807 linker_script: bool,
808 version_script: bool,
809 _: u18 = 0,
809 };810 };
810 };811 };
811812