mirror of
https://github.com/rust-lang/cargo
synced 2024-09-13 21:11:44 +00:00
3b164462d6
This commit adds support to allow specifying a custom output directory to Cargo. First, the `build.target-dir` configuration key is checked, and failing that the `CARGO_TARGET_DIR` environment variable is checked, and failing that the root package's directory joined with the directory name "target" is used. There are a few caveats to switching target directories, however: * If the target directory is in the current source tree, and the folder name is not called "target", then Cargo may walk the output directory when determining whether a tree is fresh. * If the target directory is not called "target", then Cargo may look inside it currently for `Cargo.toml` files to learn about local packages. * Concurrent usage of Cargo will still result in badness (#354), and this is now exascerbated because many Cargo projects can share the same output directory. * The top-level crate is not cached for future compilations, so if a crate is built into directory `foo` and 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
56 lines
1.1 KiB
TOML
56 lines
1.1 KiB
TOML
[project]
|
|
name = "cargo"
|
|
version = "0.3.0"
|
|
authors = ["Yehuda Katz <wycats@gmail.com>",
|
|
"Carl Lerche <me@carllerche.com>",
|
|
"Alex Crichton <alex@alexcrichton.com>"]
|
|
|
|
[lib]
|
|
name = "cargo"
|
|
path = "src/cargo/lib.rs"
|
|
|
|
[dependencies]
|
|
curl = "0.2"
|
|
docopt = "0.6"
|
|
env_logger = "0.3"
|
|
flate2 = "0.2"
|
|
git2 = { version = "0.2", features = ["unstable"] }
|
|
git2-curl = "0.2"
|
|
glob = "0.2"
|
|
libc = "0.1"
|
|
libgit2-sys = "0.2"
|
|
log = "0.3"
|
|
num_cpus = "0.1"
|
|
regex = "0.1"
|
|
registry = { path = "src/registry" }
|
|
rustc-serialize = "0.3"
|
|
semver = "0.1"
|
|
tar = { version = "0.2", features = ["nightly"] }
|
|
term = "0.2"
|
|
threadpool = "0.1"
|
|
time = "0.1"
|
|
toml = "0.1"
|
|
url = "0.2"
|
|
filetime = "0.1"
|
|
|
|
[target.i686-pc-windows-gnu]
|
|
dependencies = { winapi = "0.1", advapi32-sys = "0.1", kernel32-sys = "0.1" }
|
|
[target.x86_64-pc-windows-gnu]
|
|
dependencies = { winapi = "0.1", advapi32-sys = "0.1", kernel32-sys = "0.1" }
|
|
|
|
[dev-dependencies]
|
|
tempdir = "0.3"
|
|
hamcrest = { git = "https://github.com/carllerche/hamcrest-rust.git" }
|
|
bufstream = "0.1"
|
|
|
|
[[bin]]
|
|
name = "cargo"
|
|
test = false
|
|
doc = false
|
|
|
|
[[test]]
|
|
name = "tests"
|
|
|
|
[[test]]
|
|
name = "resolve"
|