aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2020-07-30 22:26:52 -0700
committerDavid Tolnay <dtolnay@gmail.com>2020-07-30 22:30:02 -0700
commitdd24719b97c1d26d1db9add7668e1fec21f9eb5e (patch)
treec461d0d8a749a5df647feda26f61d134610d4d24
parenta96213c6006665ed14adbe9a9b8f69226ae34b5f (diff)
downloadcxx-dd24719b97c1d26d1db9add7668e1fec21f9eb5e.tar.gz
Update bazel Rust rules
-rw-r--r--BUILD4
-rw-r--r--WORKSPACE8
-rw-r--r--third-party/BUILD8
3 files changed, 13 insertions, 7 deletions
diff --git a/BUILD b/BUILD
index d63fea7e..4d2b33a4 100644
--- a/BUILD
+++ b/BUILD
@@ -3,10 +3,12 @@ load("//tools/bazel:rust.bzl", "rust_binary", "rust_library")
rust_library(
name = "cxx",
srcs = glob(["src/**/*.rs"]),
+ proc_macro_deps = [
+ ":cxxbridge-macro",
+ ],
visibility = ["//visibility:public"],
deps = [
":core-lib",
- ":cxxbridge-macro",
"//third-party:link-cplusplus",
],
)
diff --git a/WORKSPACE b/WORKSPACE
index cafb78c1..cd2a2e88 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -2,10 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_rust",
- sha256 = "b83154a58f95618e06845b774b079000e0c39830e185db4c7bf46e79896cb3a1",
- strip_prefix = "rules_rust-0deef6dd8180cd3bc610878558bb26921b4e8de1",
- # Master branch as of 2020-03-07
- url = "https://github.com/bazelbuild/rules_rust/archive/0deef6dd8180cd3bc610878558bb26921b4e8de1.tar.gz",
+ sha256 = "5ed804fcd10a506a5b8e9e59bc6b3b7f43bc30c87ce4670e6f78df43604894fd",
+ strip_prefix = "rules_rust-fdf9655ba95616e0314b4e0ebab40bb0c5fe005c",
+ # Master branch as of 2020-07-30
+ url = "https://github.com/bazelbuild/rules_rust/archive/fdf9655ba95616e0314b4e0ebab40bb0c5fe005c.tar.gz",
)
http_archive(
diff --git a/third-party/BUILD b/third-party/BUILD
index 9aaf4f6b..a01d4b7b 100644
--- a/third-party/BUILD
+++ b/third-party/BUILD
@@ -65,9 +65,11 @@ rust_library(
rust_library(
name = "proc-macro-error",
srcs = glob(["vendor/proc-macro-error-1.0.3/src/**"]),
+ proc_macro_deps = [
+ ":proc-macro-error-attr",
+ ],
rustc_flags = ["--cfg=use_fallback"],
deps = [
- ":proc-macro-error-attr",
":proc-macro2",
":quote",
":syn",
@@ -113,11 +115,13 @@ rust_library(
rust_library(
name = "structopt",
srcs = glob(["vendor/structopt-0.3.15/src/**"]),
+ proc_macro_deps = [
+ ":structopt-derive",
+ ],
visibility = ["//visibility:public"],
deps = [
":clap",
":lazy_static",
- ":structopt-derive",
],
)