mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
Compilation: Move no_builtin to Package.Module.
This option, by its very nature, needs to be attached to a module. If it isn't, the code in a module could break at random when compiled into an application that doesn't have this option set. After this change, skip_linker_dependencies no longer implies no_builtin in the LLVM backend.
This commit is contained in:
+4
-6
@@ -810,7 +810,6 @@ fn buildOutputType(
|
||||
var compatibility_version: ?std.SemanticVersion = null;
|
||||
var function_sections = false;
|
||||
var data_sections = false;
|
||||
var no_builtin = false;
|
||||
var listen: Listen = .none;
|
||||
var debug_compile_errors = false;
|
||||
var verbose_link = (native_os != .wasi or builtin.link_libc) and
|
||||
@@ -1550,9 +1549,9 @@ fn buildOutputType(
|
||||
} else if (mem.eql(u8, arg, "-fno-data-sections")) {
|
||||
data_sections = false;
|
||||
} else if (mem.eql(u8, arg, "-fbuiltin")) {
|
||||
no_builtin = false;
|
||||
mod_opts.no_builtin = false;
|
||||
} else if (mem.eql(u8, arg, "-fno-builtin")) {
|
||||
no_builtin = true;
|
||||
mod_opts.no_builtin = true;
|
||||
} else if (mem.startsWith(u8, arg, "-fopt-bisect-limit=")) {
|
||||
const next_arg = arg["-fopt-bisect-limit=".len..];
|
||||
llvm_opt_bisect_limit = std.fmt.parseInt(c_int, next_arg, 0) catch |err|
|
||||
@@ -1963,8 +1962,8 @@ fn buildOutputType(
|
||||
.no_function_sections => function_sections = false,
|
||||
.data_sections => data_sections = true,
|
||||
.no_data_sections => data_sections = false,
|
||||
.builtin => no_builtin = false,
|
||||
.no_builtin => no_builtin = true,
|
||||
.builtin => mod_opts.no_builtin = false,
|
||||
.no_builtin => mod_opts.no_builtin = true,
|
||||
.color_diagnostics => color = .on,
|
||||
.no_color_diagnostics => color = .off,
|
||||
.stack_check => mod_opts.stack_check = true,
|
||||
@@ -3468,7 +3467,6 @@ fn buildOutputType(
|
||||
.image_base = image_base,
|
||||
.function_sections = function_sections,
|
||||
.data_sections = data_sections,
|
||||
.no_builtin = no_builtin,
|
||||
.clang_passthrough_mode = clang_passthrough_mode,
|
||||
.clang_preprocessor_mode = clang_preprocessor_mode,
|
||||
.version = optional_version,
|
||||
|
||||
Reference in New Issue
Block a user