Skip to content

run-make/thumb-none-cortex-m is no-op due to incompatible # only-target directives #67018

Closed
@pnkfelix

Description

@pnkfelix

I was working on making a run-make test today for a particular thumb target.

While looking over how we do this elsewhere, I found this bit of code:

# only-thumbv6m-none-eabi
# only-thumbv7em-none-eabi
# only-thumbv7em-none-eabihf
# only-thumbv7m-none-eabi

From my local testing, it seems like having multiple # only-target lines of this form has the net effect of making the test a no-op that does not test anything: since a target matching line 13 will not match line 14, and vice versa, there are no targets that can run on this test.

We should either revert the portion of the commit that did this:

f15d20c#diff-463654a579bb644f5d94cd0e1a6ff232

- # See https://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
- ifneq (,$(filter $(TARGET),thumbv6m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi))
+ # only-thumbv6m-none-eabi
+ # only-thumbv7em-none-eabi
+ # only-thumbv7em-none-eabihf
+ # only-thumbv7m-none-eabi

or figure out some other way to express the desired property here

(or change the semantics of # only-target when multiple targets are provided to make it gather all such targets up in a set before doing the check for membership... but I am wary of making such a change since doing it right would require differentiating e.g. processor target vs OS target, for example...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-embeddedWorking group: Embedded systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions