Skip to content

Compile with rust TCLIBC different from the project default #155

Open
@andrey-eero

Description

@andrey-eero

By default my yocto project use TCLIBC="gnu". However I need to compile fully static rust app using TCLIBC="must"
Is there a way to setup rust toolchain different from (or additional to) the default target TCLIBC?

I soled it introducing RUST_TCLIBC="musl" and patching classes/rust-common.bbclass like this.

-    tclibc = d.getVar("TCLIBC", True)
+    tclibc = d.getVar("RUST_TCLIBC", True)
+    if tclibc == "":
+        tclibc = d.getVar("TCLIBC", True)

Is there a way to do this without patching rust-common.bbclass? Can we introduce RUST_TCLIBC variable to defining TCLIBC for rust?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions