Skip to content

Modifying a target specification file should recompile of all the relevant crates #2616

Closed
@japaric

Description

@japaric

Currently it doesn't rebuild any crate.

STR

$ cargo install xargo
$ git clone https://github.com/japaric/cu
$ git checkout 2f63509838b57af8b9bea890c02cfcc41fc74e32
$ xargo build --target stm32f100
   Compiling rlibc v1.0.0
   Compiling compiler-rt v0.1.0 (file:///home/japaric/rust/cu/compiler-rt)
   Compiling cu v0.1.0 (file:///home/japaric/rust/cu)

$ edit stm32f100.json  # add a newline or whatever

$ xargo build --target stm32f100 --verbose
       Fresh rlibc v1.0.0
       Fresh compiler-rt v0.1.0 (file:///home/japaric/rust/cu/compiler-rt)
       Fresh cu v0.1.0 (file:///home/japaric/rust/cu)

Meta

$ rustc -V
rustc 1.10.0-nightly (b5ba5923f 2016-04-21)

$ cargo -V
cargo 0.11.0-nightly (867627c 2016-04-21)

recompile all the relevant crates

Should everything be recompiled? Everything that was compiled with --target $custom_target must be recompiled. But, what about build scripts? I think they can't rely on the contents of $custom_target.json right now, so they probably shouldn't be recompiled/rerun.

cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingA-target-specArea: target JSON spec filesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-build

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions