| ... | @@ -848,7 +848,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { | ... | @@ -848,7 +848,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 848 | arena, | 848 | arena, |
| 849 | options.zig_lib_directory.path.?, | 849 | options.zig_lib_directory.path.?, |
| 850 | options.target, | 850 | options.target, |
| 851 | options.is_native_os, | 851 | options.is_native_abi, |
| 852 | link_libc, | 852 | link_libc, |
| 853 | options.libc_installation, | 853 | options.libc_installation, |
| 854 | ); | 854 | ); |
| ... | @@ -2885,7 +2885,7 @@ fn detectLibCIncludeDirs( | ... | @@ -2885,7 +2885,7 @@ fn detectLibCIncludeDirs( |
| 2885 | arena: *Allocator, | 2885 | arena: *Allocator, |
| 2886 | zig_lib_dir: []const u8, | 2886 | zig_lib_dir: []const u8, |
| 2887 | target: Target, | 2887 | target: Target, |
| 2888 | is_native_os: bool, | 2888 | is_native_abi: bool, |
| 2889 | link_libc: bool, | 2889 | link_libc: bool, |
| 2890 | libc_installation: ?*const LibCInstallation, | 2890 | libc_installation: ?*const LibCInstallation, |
| 2891 | ) !LibCDirs { | 2891 | ) !LibCDirs { |
| ... | @@ -2900,6 +2900,12 @@ fn detectLibCIncludeDirs( | ... | @@ -2900,6 +2900,12 @@ fn detectLibCIncludeDirs( |
| 2900 | return detectLibCFromLibCInstallation(arena, target, lci); | 2900 | return detectLibCFromLibCInstallation(arena, target, lci); |
| 2901 | } | 2901 | } |
| 2902 | | 2902 | |
| | 2903 | if (is_native_abi) { |
| | 2904 | const libc = try arena.create(LibCInstallation); |
| | 2905 | libc.* = try LibCInstallation.findNative(.{ .allocator = arena }); |
| | 2906 | return detectLibCFromLibCInstallation(arena, target, libc); |
| | 2907 | } |
| | 2908 | |
| 2903 | if (target_util.canBuildLibC(target)) { | 2909 | if (target_util.canBuildLibC(target)) { |
| 2904 | const generic_name = target_util.libCGenericName(target); | 2910 | const generic_name = target_util.libCGenericName(target); |
| 2905 | // Some architectures are handled by the same set of headers. | 2911 | // Some architectures are handled by the same set of headers. |
| ... | @@ -2950,12 +2956,6 @@ fn detectLibCIncludeDirs( | ... | @@ -2950,12 +2956,6 @@ fn detectLibCIncludeDirs( |
| 2950 | }; | 2956 | }; |
| 2951 | } | 2957 | } |
| 2952 | | 2958 | |
| 2953 | if (is_native_os) { | | |
| 2954 | const libc = try arena.create(LibCInstallation); | | |
| 2955 | libc.* = try LibCInstallation.findNative(.{ .allocator = arena }); | | |
| 2956 | return detectLibCFromLibCInstallation(arena, target, libc); | | |
| 2957 | } | | |
| 2958 | | | |
| 2959 | return LibCDirs{ | 2959 | return LibCDirs{ |
| 2960 | .libc_include_dir_list = &[0][]u8{}, | 2960 | .libc_include_dir_list = &[0][]u8{}, |
| 2961 | .libc_installation = null, | 2961 | .libc_installation = null, |