Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow specifying a custom output directory #1657
Conversation
alexcrichton
added some commits
May 28, 2015
rust-highfive
assigned
huonw
May 28, 2015
This comment has been minimized.
This comment has been minimized.
rust-highfive
commented
May 28, 2015
|
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
r? @wycats cc @larsbergstrom, @metajack, I believe you guys have wanted this in Servo for some time now |
rust-highfive
assigned
wycats
and unassigned
huonw
May 28, 2015
This comment has been minimized.
This comment has been minimized.
metajack
commented
May 28, 2015
|
Am I correct that this is a solution for target directory sharing? |
alexcrichton
force-pushed the
alexcrichton:share-target-dirs
branch
from
80a198f
to
014765f
May 28, 2015
This comment has been minimized.
This comment has been minimized.
|
@metajack yeah, I would expect Servo to check in a top-level Alternatively Servo's build system would set the |
This comment has been minimized.
This comment has been minimized.
larsbergstrom
commented
May 28, 2015
|
@alexcrichton thank you very much! |
This comment has been minimized.
This comment has been minimized.
Hm, doesn't checking in |
This comment has been minimized.
This comment has been minimized.
|
Right, but |
This comment has been minimized.
This comment has been minimized.
|
For servo it's probably OK, I'm more thinking about this as a general footgun. |
This comment has been minimized.
This comment has been minimized.
|
(I don't really have anything concrete to offer to fix/mitigate it, and have no idea if it'll be a problem in practice.) |
This comment has been minimized.
This comment has been minimized.
|
r? @brson |
rust-highfive
assigned
brson
and unassigned
wycats
Jun 4, 2015
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jun 4, 2015
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 014765f
into
rust-lang:master
Jun 4, 2015
This comment has been minimized.
This comment has been minimized.
gentoo90
commented on 655c40b
Jun 4, 2015
|
@alexcrichton, could you add |
This comment has been minimized.
This comment has been minimized.
|
Ah this wasn't actually the release of 0.3.0, we're more on the "0.3.0 nightly" branch right now. When this bumps to 0.4.0 I'll tag the 0.3.0 release. |
alexcrichton commentedMay 28, 2015
This commit adds support to allow specifying a custom output directory to Cargo.
First, the
build.target-dirconfiguration key is checked, and failing that theCARGO_TARGET_DIRenvironment variable is checked, and failing that the rootpackage's directory joined with the directory name "target" is used.
There are a few caveats to switching target directories, however:
not called "target", then Cargo may walk the output directory when determining
whether a tree is fresh.
currently for
Cargo.tomlfiles to learn about local packages.exascerbated because many Cargo projects can share the same output directory.
built into directory
fooand then that crate is later used as a dependency,it will be recompiled.
The naming limitations can be overcome in time, but for now it greatly
simplifies the crawling routines and shouldn't have much of a negative impact
other than some Cargo runtimes (which can in turn be negated by following the
"target" name convention).
Closes #482