bors 715fc78caa Auto merge of #5228 - phil-opp:target-spec, r=alexcrichton
Add support for absolute target.json paths

Builds upon https://github.com/rust-lang/rust/pull/49019 with the goal to provide a solution to https://github.com/rust-lang/cargo/issues/4905.

This PR does two things:

~~1. It appends a hash of the target path to the target folder name if a `*.json` path is passed as `--target`, like it's done in https://github.com/rust-lang/rust/pull/49019. This helps differentiating targets with the same JSON file name and avoids sysroot clashes in `xargo`.~~ See https://github.com/rust-lang/cargo/pull/5228#discussion_r176827531
2. It canonicalizes the passed target path (if it's a `*.json` path), so that the path stays valid when building dependencies and setting the `RUST_TARGET_PATH` environment variable is no longer necessary.
2018-03-26 13:00:26 +00:00

92 lines
1.4 KiB
Rust

#![deny(warnings)]
extern crate bufstream;
extern crate cargo;
extern crate filetime;
extern crate flate2;
extern crate git2;
extern crate glob;
extern crate hex;
extern crate libc;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate serde_json;
extern crate tar;
extern crate tempfile;
extern crate toml;
extern crate url;
#[cfg(windows)]
extern crate winapi;
#[macro_use]
mod cargotest;
mod hamcrest;
mod alt_registry;
mod bad_config;
mod bad_manifest_path;
mod bench;
mod build_auth;
mod build_lib;
mod build;
mod build_script_env;
mod build_script;
mod cargo_alias_config;
mod cargo_features;
mod cargo_command;
mod cfg;
mod check;
mod clean;
mod concurrent;
mod config;
mod corrupt_git;
mod cross_compile;
mod cross_publish;
mod custom_target;
mod death;
mod dep_info;
mod directory;
mod doc;
mod features;
mod fetch;
mod freshness;
mod generate_lockfile;
mod git;
mod init;
mod install;
mod jobserver;
mod local_registry;
mod lockfile_compat;
mod login;
mod metadata;
mod net_config;
mod new;
mod overrides;
mod package;
mod patch;
mod path;
mod plugins;
mod proc_macro;
mod profiles;
mod publish;
mod read_manifest;
mod registry;
mod rename_deps;
mod required_features;
mod resolve;
mod run;
mod rustc;
mod rustdocflags;
mod rustdoc;
mod rustflags;
mod search;
mod small_fd_limits;
mod test;
mod tool_paths;
mod update;
mod verify_project;
mod version;
mod warn_on_failure;
mod workspaces;