[build] Make manifest optional in component
fuchsia_component will now look for manifest in "meta" folder if it is
not provided.
Change-Id: Ic18b06715d6209e5b044773fb44e80a68a4a5b4a
diff --git a/package/component.gni b/package/component.gni
index 0d14cc3..7fe8bfc 100644
--- a/package/component.gni
+++ b/package/component.gni
@@ -19,9 +19,11 @@
#
# If not provided, defaults to $target_name
#
-# manifest (required)
+# manifest (optional)
# [path] Defines the manifest source path for this component.
#
+# By default it would look for meta/$name.cmx file relative to your BUILD.gn.
+#
# binary (required)
# [path] The path to the the primary binary for the component.
#
@@ -106,8 +108,9 @@
if (!defined(loadable_modules)) {
loadable_modules = []
}
- assert(defined(manifest),
- "Component $component_label should define manifest file")
+ if (!defined(manifest)) {
+ manifest = rebase_path("meta/${name}.cmx")
+ }
if (!defined(resources)) {
resources = []
}