mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
Compilation.create: skip libc_installation on darwin
If the "is darwin" check is moved below the libc_installation check below, error.LibCInstallationMissingCrtDir is returned from lci.resolveCrtPaths(). This should be revisited because it makes sense to check libc_installation first even on darwin. Anyway for now this more closely matches logic from master branch.
This commit is contained in:
parent
f2efe05155
commit
e0623df9f7
1 changed files with 9 additions and 1 deletions
|
|
@ -1769,7 +1769,15 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
|
|||
// If linking against host libc installation, instead queue up jobs
|
||||
// for loading those files in the linker.
|
||||
if (comp.config.link_libc and is_exe_or_dyn_lib) {
|
||||
if (comp.libc_installation) |lci| {
|
||||
// If the "is darwin" check is moved below the libc_installation check below,
|
||||
// error.LibCInstallationMissingCrtDir is returned from lci.resolveCrtPaths().
|
||||
if (target.isDarwin()) {
|
||||
switch (target.abi) {
|
||||
.none, .simulator, .macabi => {},
|
||||
else => return error.LibCUnavailable,
|
||||
}
|
||||
// TODO delete logic from MachO flush() and queue up tasks here instead.
|
||||
} else if (comp.libc_installation) |lci| {
|
||||
const basenames = LibCInstallation.CrtBasenames.get(.{
|
||||
.target = target,
|
||||
.link_libc = comp.config.link_libc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue