target_to_git: Use build options

Bug: 600
Change-Id: I2001e92c3d7967113e838704b774ff26c1c89605
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/79461
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/recipes/target_to_git.proto b/recipes/target_to_git.proto
index 7059dad..ff9ed2a 100644
--- a/recipes/target_to_git.proto
+++ b/recipes/target_to_git.proto
@@ -16,6 +16,8 @@
 
 package recipes.pigweed.target_to_git;
 
+import "recipe_modules/pigweed/build/options.proto";
+
 message InputProperties {
   // Root directory within the build tree to add to a git repository.
   string artifact_root = 1;
@@ -29,4 +31,7 @@
 
   // Don't do anything that has external effects.
   bool dry_run = 5;
+
+  // Build module options.
+  recipe_modules.pigweed.build.Options build_options = 6;
 }
diff --git a/recipes/target_to_git.py b/recipes/target_to_git.py
index bf10829..1f97ecb 100644
--- a/recipes/target_to_git.py
+++ b/recipes/target_to_git.py
@@ -43,7 +43,7 @@
     api.environment.init(api.checkout.root)
 
     with api.environment():
-        api.build(api.checkout.root)
+        api.build(api.checkout.root, props.build_options)
 
     export_repo = api.path['start_dir'].join('export_repo')
     api.checkout(