| author | |
| committer | |
| log | c76a98f28a2623d0622b373f3b6d9aa23c3da54a |
| tree | 1e6fb67da705efd7d84663b41e34518f35cc000d |
| parent | 482759079f423681928467bf0f68a755a1a1a087 |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
5 files changed, 10 insertions(+), 10 deletions(-)
lib/std/Build/Module.zig+2-2| ... | ... | @@ -492,11 +492,11 @@ pub fn linkSystemLibrary( |
| 492 | 492 | const b = m.owner; |
| 493 | 493 | |
| 494 | 494 | const target = m.requireKnownTarget(); |
| 495 | if (target.is_libc_lib_name(name)) { | |
| 495 | if (target.isLibCLibName(name)) { | |
| 496 | 496 | m.link_libc = true; |
| 497 | 497 | return; |
| 498 | 498 | } |
| 499 | if (target.is_libcpp_lib_name(name)) { | |
| 499 | if (target.isLibCxxLibName(name)) { | |
| 500 | 500 | m.link_libcpp = true; |
| 501 | 501 | return; |
| 502 | 502 | } |
lib/std/Build/Step/Compile.zig+2-2| ... | ... | @@ -611,11 +611,11 @@ pub fn dependsOnSystemLibrary(compile: *const Compile, name: []const u8) bool { |
| 611 | 611 | is_linking_libcpp = is_linking_libcpp or module.link_libcpp == true; |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | if (compile.rootModuleTarget().is_libc_lib_name(name)) { | |
| 614 | if (compile.rootModuleTarget().isLibCLibName(name)) { | |
| 615 | 615 | return is_linking_libc; |
| 616 | 616 | } |
| 617 | 617 | |
| 618 | if (compile.rootModuleTarget().is_libcpp_lib_name(name)) { | |
| 618 | if (compile.rootModuleTarget().isLibCxxLibName(name)) { | |
| 619 | 619 | return is_linking_libcpp; |
| 620 | 620 | } |
| 621 | 621 |
lib/std/Target.zig+2-2| ... | ... | @@ -2868,7 +2868,7 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { |
| 2868 | 2868 | ); |
| 2869 | 2869 | } |
| 2870 | 2870 | |
| 2871 | pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { | |
| 2871 | pub fn isLibCLibName(target: std.Target, name: []const u8) bool { | |
| 2872 | 2872 | const ignore_case = target.os.tag == .macos or target.os.tag == .windows; |
| 2873 | 2873 | |
| 2874 | 2874 | if (eqlIgnoreCase(ignore_case, name, "c")) |
| ... | ... | @@ -2987,7 +2987,7 @@ pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { |
| 2987 | 2987 | return false; |
| 2988 | 2988 | } |
| 2989 | 2989 | |
| 2990 | pub fn is_libcpp_lib_name(target: std.Target, name: []const u8) bool { | |
| 2990 | pub fn isLibCxxLibName(target: std.Target, name: []const u8) bool { | |
| 2991 | 2991 | const ignore_case = target.os.tag.isDarwin() or target.os.tag == .windows; |
| 2992 | 2992 | |
| 2993 | 2993 | return eqlIgnoreCase(ignore_case, name, "c++") or |
src/Sema.zig+2-2| ... | ... | @@ -9606,7 +9606,7 @@ fn handleExternLibName( |
| 9606 | 9606 | const comp = zcu.comp; |
| 9607 | 9607 | const target = zcu.getTarget(); |
| 9608 | 9608 | log.debug("extern fn symbol expected in lib '{s}'", .{lib_name}); |
| 9609 | if (target.is_libc_lib_name(lib_name)) { | |
| 9609 | if (target.isLibCLibName(lib_name)) { | |
| 9610 | 9610 | if (!comp.config.link_libc) { |
| 9611 | 9611 | return sema.fail( |
| 9612 | 9612 | block, |
| ... | ... | @@ -9617,7 +9617,7 @@ fn handleExternLibName( |
| 9617 | 9617 | } |
| 9618 | 9618 | break :blk; |
| 9619 | 9619 | } |
| 9620 | if (target.is_libcpp_lib_name(lib_name)) { | |
| 9620 | if (target.isLibCxxLibName(lib_name)) { | |
| 9621 | 9621 | if (!comp.config.link_libcpp) return sema.fail( |
| 9622 | 9622 | block, |
| 9623 | 9623 | src_loc, |
src/main.zig+2-2| ... | ... | @@ -3765,11 +3765,11 @@ fn createModule( |
| 3765 | 3765 | info: SystemLib, |
| 3766 | 3766 | }) = .{}; |
| 3767 | 3767 | for (create_module.system_libs.keys(), create_module.system_libs.values()) |lib_name, info| { |
| 3768 | if (target.is_libc_lib_name(lib_name)) { | |
| 3768 | if (target.isLibCLibName(lib_name)) { | |
| 3769 | 3769 | create_module.opts.link_libc = true; |
| 3770 | 3770 | continue; |
| 3771 | 3771 | } |
| 3772 | if (target.is_libcpp_lib_name(lib_name)) { | |
| 3772 | if (target.isLibCxxLibName(lib_name)) { | |
| 3773 | 3773 | create_module.opts.link_libcpp = true; |
| 3774 | 3774 | continue; |
| 3775 | 3775 | } |