Generate cargo_pkg_version and cargo_env_compat for defaults.

The existing code only adds it to things without defaults.  This adds
it to the defaults module itself, which should not overlap the
existing code.

Test: Run and see new entries.
Change-Id: Iaf3d0b47193bb1f54cdc605c88c2cd68034d963a
This commit is contained in:
Joel Galenson
2021-08-31 14:28:48 -07:00
parent 23d41df362
commit b06c42a03c

View File

@@ -645,6 +645,9 @@ class Crate(object):
if self.has_warning and not self.cap_lints:
self.write(' // has rustc warnings')
self.dump_srcs_list()
if self.cargo_env_compat:
self.write(' cargo_env_compat: true,')
self.write(' cargo_pkg_version: "' + self.cargo_pkg_version + '",')
if 'test' in self.crate_types:
self.write(' test_suites: ["general-tests"],')
self.write(' auto_gen_config: true,')