diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-05 15:33:28 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-05 22:41:09 +0100 |
| commit | 7fef0b4a23ae616ebfec978d6af8e9f716a63555 (patch) | |
| tree | 7a6589eea300419aac05c8c5b53c3683a290026b /src/Compilation.zig | |
| parent | f973d3e93e9bb419212a187e787de94929de928d (diff) | |
| download | zig-7fef0b4a23ae616ebfec978d6af8e9f716a63555.tar.gz zig-7fef0b4a23ae616ebfec978d6af8e9f716a63555.zip | |
musl: Pass -f(function,data)-sections via CrtFileOptions instead of CFLAGS.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index b3684d7e61..0dcc121fac 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -6262,6 +6262,8 @@ fn buildOutputFromZig( } pub const CrtFileOptions = struct { + function_sections: ?bool = null, + data_sections: ?bool = null, pic: ?bool = null, no_builtin: ?bool = null, }; @@ -6356,6 +6358,8 @@ pub fn build_crt_file( .directory = null, // Put it in the cache directory. .basename = basename, }, + .function_sections = options.function_sections orelse false, + .data_sections = options.data_sections orelse false, .emit_h = null, .c_source_files = c_source_files, .verbose_cc = comp.verbose_cc, |
