Add Rust proc-macros to host snapshot update.py

Bug: 204304380
Test: The host snapshot Android.bp includes proc-macros.
Change-Id: I7d406d9075fc5a6aa5983a5fef71edd119c6f67f
diff --git a/vendor_snapshot/update.py b/vendor_snapshot/update.py
index 03cc236..e209584 100644
--- a/vendor_snapshot/update.py
+++ b/vendor_snapshot/update.py
@@ -110,6 +110,7 @@
     'RuntimeLibs': 'runtime_libs',
     'Required': 'required',
     'Filename': 'filename',
+    'CrateName': 'crate_name',
 }
 
 SANITIZER_VARIANT_PROPS = {
@@ -409,18 +410,25 @@
       mod: JSON definition of the module
       install_dir: installation directory of the host snapshot
     """
+    rust_proc_macro = mod.pop('RustProcMacro', False)
     prop = convert_json_data_to_bp_prop(mod, install_dir)
-    prop['host_supported'] = True
-    prop['device_supported'] = False
+    if not rust_proc_macro:
+        prop['host_supported'] = True
+        prop['device_supported'] = False
+        prop['stl'] = 'none'
     prop['prefer'] = True
-    prop['stl'] = 'none'
     ## Move install file to host source file
     prop['target'] = dict()
     prop['target']['host'] = dict()
     prop['target']['host']['srcs'] = [prop['filename']]
     del prop['filename']
 
-    bp = 'cc_prebuilt_binary {\n' + gen_bp_prop(prop, INDENT) + '}\n\n'
+    mod_type = 'cc_prebuilt_binary'
+
+    if rust_proc_macro:
+        mod_type = 'rust_prebuilt_proc_macro'
+
+    bp = mod_type + ' {\n' + gen_bp_prop(prop, INDENT) + '}\n\n'
     return bp
 
 def gen_host_bp_file(install_dir):