Skip to content

build.rs: Questionable check target_os == "loongarch64" in musl_v1_2_3 check #4526

Closed

Description

@neuschaefer

While browsing the libc crate source code, I noticed this part:

    // loongarch64 and ohos have already updated
    if musl_v1_2_3 || target_os == "loongarch64" || target_env == "ohos" {
        // FIXME(musl): enable time64 api as well
        set_cfg("musl_v1_2_3");
    }

This is suspicious because it should probably be target_arch, not target_os.

Activity

  1. tgross35 commented on Jul 3, 2025

    @tgross35
    Member

    Oh boy, you're right. This was introduced at #4443 but must not have any effect since those tests aren't failing.

    Please feel free to submit a PR if you're already looking at the code, otherwise I'll try to put one up at some point.

  2. neuschaefer commented on Jul 4, 2025

    @neuschaefer
    ContributorAuthor

    I'll leave it up to you, since I'm not looking that deeply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions