mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
Package.Module: Make create() fall back on options.global.root_optimize_mode.
As is done for root_strip and root_error_tracing.
This commit is contained in:
parent
ef4d7f01a5
commit
41185d297f
@ -56,6 +56,7 @@ export_memory: bool,
|
||||
shared_memory: bool,
|
||||
is_test: bool,
|
||||
debug_format: DebugFormat,
|
||||
root_optimize_mode: std.builtin.OptimizeMode,
|
||||
root_strip: bool,
|
||||
root_error_tracing: bool,
|
||||
dll_export_fns: bool,
|
||||
@ -508,6 +509,7 @@ pub fn resolve(options: Options) ResolveError!Config {
|
||||
.use_lld = use_lld,
|
||||
.wasi_exec_model = wasi_exec_model,
|
||||
.debug_format = debug_format,
|
||||
.root_optimize_mode = root_optimize_mode,
|
||||
.root_strip = root_strip,
|
||||
.dll_export_fns = dll_export_fns,
|
||||
.rdynamic = rdynamic,
|
||||
|
||||
@ -119,7 +119,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
|
||||
const target = resolved_target.result;
|
||||
|
||||
const optimize_mode = options.inherited.optimize_mode orelse
|
||||
if (options.parent) |p| p.optimize_mode else .Debug;
|
||||
if (options.parent) |p| p.optimize_mode else options.global.root_optimize_mode;
|
||||
|
||||
const strip = b: {
|
||||
if (options.inherited.strip) |x| break :b x;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user