Move fallback to scratch crate's out dir

This commit is contained in:
David Tolnay 2020-10-08 19:31:48 -07:00
parent a8beeef131
commit 66ebdd1d1f
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 1 additions and 4 deletions

1
BUCK
View File

@ -48,7 +48,6 @@ rust_library(
rust_library(
name = "build",
srcs = glob(["gen/build/src/**"]),
env = {"OUT_DIR": ""},
visibility = ["PUBLIC"],
deps = [
"//third-party:cc",

1
BUILD
View File

@ -54,7 +54,6 @@ rust_library(
name = "build",
srcs = glob(["gen/build/src/**/*.rs"]),
data = ["gen/build/src/gen/include/cxx.h"],
rustc_env = {"OUT_DIR": ""},
visibility = ["//visibility:public"],
deps = [
"//third-party:cc",

View File

@ -142,8 +142,7 @@ impl Project {
let shared_dir = match target_dir {
TargetDir::Path(target_dir) => target_dir.join("cxxbridge"),
// Use cxx-build's OUT_DIR.
TargetDir::Unknown => PathBuf::from(env!("OUT_DIR")),
TargetDir::Unknown => scratch::path("cxxbridge"),
};
Ok(Project {