diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-17 02:49:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-17 02:49:34 +0200 |
| commit | d38ed893c6ece24e52b2e0a1f8d75f6a912686d7 (patch) | |
| tree | dd79b7c06c3482c47d62305e1b53278fe995cc1b /lib/std/Build | |
| parent | 4a2a0f50caac5e6f7f17e5abe17dd53e9bdc1731 (diff) | |
| parent | 549a7eba40aebaad2ede0fef3a574f52315c36cf (diff) | |
| download | zig-d38ed893c6ece24e52b2e0a1f8d75f6a912686d7.tar.gz zig-d38ed893c6ece24e52b2e0a1f8d75f6a912686d7.zip | |
Merge pull request #21726 from alexrp/target-api
`std.Target`: Some miscellaneous API improvements
Diffstat (limited to 'lib/std/Build')
| -rw-r--r-- | lib/std/Build/Module.zig | 4 | ||||
| -rw-r--r-- | lib/std/Build/Step/Compile.zig | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/Build/Module.zig b/lib/std/Build/Module.zig index 253945b3d7..347695a4c0 100644 --- a/lib/std/Build/Module.zig +++ b/lib/std/Build/Module.zig @@ -492,11 +492,11 @@ pub fn linkSystemLibrary( const b = m.owner; const target = m.requireKnownTarget(); - if (target.is_libc_lib_name(name)) { + if (std.zig.target.isLibCLibName(target, name)) { m.link_libc = true; return; } - if (target.is_libcpp_lib_name(name)) { + if (std.zig.target.isLibCxxLibName(target, name)) { m.link_libcpp = true; return; } diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index a977dc3056..469fbdf74a 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -611,11 +611,13 @@ pub fn dependsOnSystemLibrary(compile: *const Compile, name: []const u8) bool { is_linking_libcpp = is_linking_libcpp or module.link_libcpp == true; } - if (compile.rootModuleTarget().is_libc_lib_name(name)) { + const target = compile.rootModuleTarget(); + + if (std.zig.target.isLibCLibName(target, name)) { return is_linking_libc; } - if (compile.rootModuleTarget().is_libcpp_lib_name(name)) { + if (std.zig.target.isLibCxxLibName(target, name)) { return is_linking_libcpp; } |
