| ... | ... | @@ -15,8 +15,6 @@ const Target = std.Target; |
| 15 | 15 | const CrossTarget = std.zig.CrossTarget; |
| 16 | 16 | const macos = @import("system/macos.zig"); |
| 17 | 17 | |
| 18 | | const is_windows = Target.current.os.tag == .windows; |
| 19 | | |
| 20 | 18 | pub const getSDKPath = macos.getSDKPath; |
| 21 | 19 | |
| 22 | 20 | pub const NativePaths = struct { |
| ... | ... | @@ -26,7 +24,9 @@ pub const NativePaths = struct { |
| 26 | 24 | rpaths: ArrayList([:0]u8), |
| 27 | 25 | warnings: ArrayList([:0]u8), |
| 28 | 26 | |
| 29 | | pub fn detect(allocator: *Allocator) !NativePaths { |
| 27 | pub fn detect(allocator: *Allocator, native_info: NativeTargetInfo) !NativePaths { |
| 28 | const native_target = native_info.target; |
| 29 | |
| 30 | 30 | var self: NativePaths = .{ |
| 31 | 31 | .include_dirs = ArrayList([:0]u8).init(allocator), |
| 32 | 32 | .lib_dirs = ArrayList([:0]u8).init(allocator), |
| ... | ... | @@ -103,9 +103,9 @@ pub const NativePaths = struct { |
| 103 | 103 | return self; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | | if (!is_windows) { |
| 107 | | const triple = try Target.current.linuxTriple(allocator); |
| 108 | | const qual = Target.current.cpu.arch.ptrBitWidth(); |
| 106 | if (native_target.os.tag != .windows) { |
| 107 | const triple = try native_target.linuxTriple(allocator); |
| 108 | const qual = native_target.cpu.arch.ptrBitWidth(); |
| 109 | 109 | |
| 110 | 110 | // TODO: $ ld --verbose | grep SEARCH_DIR |
| 111 | 111 | // the output contains some paths that end with lib64, maybe include them too? |