diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2023-09-22 14:10:24 -0400 |
|---|---|---|
| committer | Michael Dusan <michael.dusan@gmail.com> | 2023-09-25 15:53:05 -0400 |
| commit | 9357973912798d3f64938762ea8993ff3a083ac0 (patch) | |
| tree | 96904629a22bb99a16b427857569696d8612c276 /src/Compilation.zig | |
| parent | 50f2d7958226efaa9cd441998877c125cd01533b (diff) | |
| download | zig-9357973912798d3f64938762ea8993ff3a083ac0.tar.gz zig-9357973912798d3f64938762ea8993ff3a083ac0.zip | |
kubkon review changes: 1
general:
- rename `DarwinSdkLayout` → `DarwinSdkLayout`
- drop `DarwinSdkLayout.installation` (not needed for darwin)
- document struct
inferSdkVersion:
- use explicit allocator
- avoid trying to infer SDK ver from vendored path
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index e9f6be89fd..65e433627f 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1554,10 +1554,10 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { .use_lld = use_lld, .use_llvm = use_llvm, .use_lib_llvm = use_lib_llvm, - .libc_provider = libc_dirs.provider, .link_libc = link_libc, .link_libcpp = link_libcpp, .link_libunwind = link_libunwind, + .darwinSdkLayout = libc_dirs.darwinSdkLayout, .objects = options.link_objects, .frameworks = options.frameworks, .framework_dirs = options.framework_dirs, @@ -5287,6 +5287,7 @@ fn detectWin32ResourceIncludeDirs(arena: Allocator, options: InitOptions) !LibCD .libc_installation = null, .libc_framework_dir_list = &.{}, .sysroot = null, + .darwinSdkLayout = .none, }, } } @@ -5655,7 +5656,7 @@ const LibCDirs = struct { libc_installation: ?*const LibCInstallation, libc_framework_dir_list: []const []const u8, sysroot: ?[]const u8, - provider: link.LibCProvider, + darwinSdkLayout: link.DarwinSdkLayout, }; fn getZigShippedLibCIncludeDirsDarwin(arena: Allocator, zig_lib_dir: []const u8) !LibCDirs { @@ -5671,7 +5672,7 @@ fn getZigShippedLibCIncludeDirsDarwin(arena: Allocator, zig_lib_dir: []const u8) .libc_installation = null, .libc_framework_dir_list = &.{}, .sysroot = null, - .provider = .vendored, + .darwinSdkLayout = .vendored, }; } @@ -5689,7 +5690,7 @@ pub fn detectLibCIncludeDirs( .libc_installation = null, .libc_framework_dir_list = &.{}, .sysroot = null, - .provider = .none, + .darwinSdkLayout = .none, }; } @@ -5747,7 +5748,7 @@ pub fn detectLibCIncludeDirs( .libc_installation = null, .libc_framework_dir_list = &.{}, .sysroot = null, - .provider = .none, + .darwinSdkLayout = .none, }; } @@ -5802,7 +5803,7 @@ fn detectLibCFromLibCInstallation(arena: Allocator, target: Target, lci: *const .libc_installation = lci, .libc_framework_dir_list = framework_list.items, .sysroot = sysroot, - .provider = if (sysroot == null) .installation else .sysroot, + .darwinSdkLayout = if (sysroot == null) .none else .sdk, }; } @@ -5864,7 +5865,7 @@ fn detectLibCFromBuilding( .libc_installation = null, .libc_framework_dir_list = &.{}, .sysroot = null, - .provider = .vendored, + .darwinSdkLayout = .vendored, }; } |
