mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
build: Expose function-sections switch
This commit is contained in:
parent
a2432b6755
commit
582991a5a8
@ -1157,8 +1157,14 @@ pub const LibExeObjStep = struct {
|
||||
|
||||
valgrind_support: ?bool = null,
|
||||
|
||||
/// Create a .eh_frame_hdr section and a PT_GNU_EH_FRAME segment in the ELF
|
||||
/// file.
|
||||
link_eh_frame_hdr: bool = false,
|
||||
|
||||
/// Place every function in its own section so that unused ones may be
|
||||
/// safely garbage-collected during the linking phase.
|
||||
link_function_sections: bool = false,
|
||||
|
||||
/// Uses system Wine installation to run cross compiled Windows build artifacts.
|
||||
enable_wine: bool = false,
|
||||
|
||||
@ -1884,7 +1890,9 @@ pub const LibExeObjStep = struct {
|
||||
if (self.link_eh_frame_hdr) {
|
||||
try zig_args.append("--eh-frame-hdr");
|
||||
}
|
||||
|
||||
if (self.link_function_sections) {
|
||||
try zig_args.append("-ffunction-sections");
|
||||
}
|
||||
if (self.single_threaded) {
|
||||
try zig_args.append("--single-threaded");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user