Skip to content

make: rustc invocations need to depend on the rustc libraries #8057

@pnkfelix

Description

@pnkfelix

(creating issue to match PR #7820, since I worry about that growing stale, and there are some things like labels that you can use with filed Issues that you cannot use with pull requests.)

As written in Makefile.in, $(STAGE$(1)T$(2)H$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple. (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using make -jN for certain (large-ish) N, one can encounter situations where
GNU make attempts to invoke rustc before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)T$(2)H$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

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