Adding autogenerated Trusty makefile rules

Bug: 281857510
Test: build.py --skip-tests qemu-generic-arm64-test-debug
Change-Id: Iabb16709393b7e5a6aaa5d6e0e66bcd8a55ad03a
diff --git a/1.0.107/rules.mk b/1.0.107/rules.mk
new file mode 100644
index 0000000..af6e0b7
--- /dev/null
+++ b/1.0.107/rules.mk
@@ -0,0 +1,31 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+MODULE := $(LOCAL_DIR)
+MODULE_CRATE_NAME := syn
+MODULE_SRCS := \
+	$(LOCAL_DIR)/src/lib.rs \
+
+# The crate name is still syn but the file name
+# should be libsyn_deprecated.rlib
+MODULE_RUST_STEM := syn_1.0.107
+
+MODULE_RUST_EDITION := 2018
+MODULE_RUSTFLAGS += \
+	--cfg 'feature="clone-impls"' \
+	--cfg 'feature="default"' \
+	--cfg 'feature="derive"' \
+	--cfg 'feature="extra-traits"' \
+	--cfg 'feature="full"' \
+	--cfg 'feature="parsing"' \
+	--cfg 'feature="printing"' \
+	--cfg 'feature="proc-macro"' \
+	--cfg 'feature="quote"' \
+	--cfg 'feature="visit"' \
+	--cfg 'feature="visit-mut"' \
+	--cfg 'syn_disable_nightly_tests' \
+
+MODULE_LIBRARY_DEPS := \
+	external/rust/crates/proc-macro2 \
+	external/rust/crates/quote \
+	external/rust/crates/unicode-ident \
+
+include make/library.mk
diff --git a/cargo2rulesmk.json b/cargo2rulesmk.json
new file mode 100644
index 0000000..75f01f0
--- /dev/null
+++ b/cargo2rulesmk.json
@@ -0,0 +1,4 @@
+{
+  "features": "default,full,visit,visit-mut,extra-traits",
+  "patch": "patches/rules.mk.diff"
+}
diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff
new file mode 100644
index 0000000..876e04a
--- /dev/null
+++ b/patches/rules.mk.diff
@@ -0,0 +1,12 @@
+diff --git a/rules.mk b/rules.mk
+index cc0900b2..e45ae654 100644
+--- a/rules.mk
++++ b/rules.mk
+@@ -23,6 +23,7 @@ MODULE_RUSTFLAGS += \
+ 
+ MODULE_LIBRARY_DEPS := \
+ 	external/rust/crates/proc-macro2 \
++	external/rust/crates/quote \
+ 	external/rust/crates/unicode-ident \
+ 
+ include make/library.mk
diff --git a/rules.mk b/rules.mk
new file mode 100644
index 0000000..e45ae65
--- /dev/null
+++ b/rules.mk
@@ -0,0 +1,29 @@
+# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json.
+# Do not modify this file as changes will be overridden on upgrade.
+
+LOCAL_DIR := $(GET_LOCAL_DIR)
+MODULE := $(LOCAL_DIR)
+MODULE_CRATE_NAME := syn
+MODULE_SRCS := \
+	$(LOCAL_DIR)/src/lib.rs \
+
+MODULE_RUST_EDITION := 2021
+MODULE_RUSTFLAGS += \
+	--cfg 'feature="clone-impls"' \
+	--cfg 'feature="default"' \
+	--cfg 'feature="derive"' \
+	--cfg 'feature="extra-traits"' \
+	--cfg 'feature="full"' \
+	--cfg 'feature="parsing"' \
+	--cfg 'feature="printing"' \
+	--cfg 'feature="proc-macro"' \
+	--cfg 'feature="quote"' \
+	--cfg 'feature="visit"' \
+	--cfg 'feature="visit-mut"' \
+
+MODULE_LIBRARY_DEPS := \
+	external/rust/crates/proc-macro2 \
+	external/rust/crates/quote \
+	external/rust/crates/unicode-ident \
+
+include make/library.mk