Build and run syn build script in Buck and Bazel rules
diff --git a/third-party/BUCK b/third-party/BUCK
index e75544f..2633da8 100644
--- a/third-party/BUCK
+++ b/third-party/BUCK
@@ -71,6 +71,7 @@
rust_library(
name = "syn",
srcs = glob(["vendor/syn-1.0.75/src/**"]),
+ build_script = "vendor/syn-1.0.75/build.rs",
features = [
"clone-impls",
"derive",
diff --git a/third-party/BUILD b/third-party/BUILD
index 0b927b6..1760b70 100644
--- a/third-party/BUILD
+++ b/third-party/BUILD
@@ -98,10 +98,25 @@
deps = [
":proc-macro2",
":quote",
+ ":syn@build",
":unicode-xid",
],
)
+cargo_build_script(
+ name = "syn@build",
+ srcs = ["vendor/syn-1.0.75/build.rs"],
+ crate_features = [
+ "clone-impls",
+ "derive",
+ "full",
+ "parsing",
+ "printing",
+ "proc-macro",
+ ],
+ crate_name = "build",
+)
+
rust_library(
name = "termcolor",
srcs = glob(["vendor/termcolor-1.1.2/src/**"]),