mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 23:53:15 +00:00
Add std.Target.current.isDarwin() to exclude non-macs in comptime
This commit is contained in:
parent
f42ebd1b0a
commit
6ecefd5903
@ -472,9 +472,12 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
|
||||
break :blk false;
|
||||
};
|
||||
|
||||
const syslibroot = if (build_options.have_llvm and use_lld and options.is_native_os and options.target.isDarwin()) blk: {
|
||||
const syslibroot_path = try std.zig.system.getSDKPath(arena);
|
||||
break :blk syslibroot_path;
|
||||
const syslibroot = if (build_options.have_llvm and comptime std.Target.current.isDarwin()) outer: {
|
||||
const path = if (use_lld and options.is_native_os and options.target.isDarwin()) inner: {
|
||||
const syslibroot_path = try std.zig.system.getSDKPath(arena);
|
||||
break :inner syslibroot_path;
|
||||
} else null;
|
||||
break :outer path;
|
||||
} else null;
|
||||
|
||||
const link_libc = options.link_libc or target_util.osRequiresLibC(options.target);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user