mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
stage2: -fbuild-id causes default linker to be LLD
until zig's self-hosted linker gains this functionality.
This commit is contained in:
parent
8c0f4e6f54
commit
cbb806da6e
@ -975,6 +975,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
const unwind_tables = options.want_unwind_tables orelse
|
||||
(link_libunwind or target_util.needUnwindTables(options.target));
|
||||
const link_eh_frame_hdr = options.link_eh_frame_hdr or unwind_tables;
|
||||
const build_id = options.build_id orelse false;
|
||||
|
||||
// Make a decision on whether to use LLD or our own linker.
|
||||
const use_lld = options.use_lld orelse blk: {
|
||||
@ -1005,7 +1006,8 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
options.output_mode == .Lib or
|
||||
options.image_base_override != null or
|
||||
options.linker_script != null or options.version_script != null or
|
||||
options.emit_implib != null)
|
||||
options.emit_implib != null or
|
||||
build_id)
|
||||
{
|
||||
break :blk true;
|
||||
}
|
||||
@ -1640,7 +1642,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
.skip_linker_dependencies = options.skip_linker_dependencies,
|
||||
.parent_compilation_link_libc = options.parent_compilation_link_libc,
|
||||
.each_lib_rpath = options.each_lib_rpath orelse options.is_native_os,
|
||||
.build_id = options.build_id orelse false,
|
||||
.build_id = build_id,
|
||||
.cache_mode = cache_mode,
|
||||
.disable_lld_caching = options.disable_lld_caching or cache_mode == .whole,
|
||||
.subsystem = options.subsystem,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user