pw_presubmit: build pw_crypto for host only

The pw_crypto presubmit steps are mostly for making sure all the
backends builds and passes unit tests. For that purpose we don't need to
build the default target -- host targets alone are fine.

Bug: 241390466
Change-Id: I81b7679c6577e3b02f047ccc7f601183087f2fc6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/105663
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index 4b8d8f8..c38e05d 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -193,7 +193,8 @@
                                                'pw_crypto:sha256_mbedtls'),
         pw_crypto_ECDSA_BACKEND='"{}"'.format(ctx.root /
                                               'pw_crypto:ecdsa_mbedtls'))
-    build.ninja(ctx.output_dir)
+    build.ninja(ctx.output_dir,
+                *_at_all_optimization_levels(f'host_{_HOST_COMPILER}'))
 
 
 @_BUILD_FILE_FILTER.apply_to_check()
@@ -209,7 +210,8 @@
         pw_crypto_ECDSA_BACKEND='"{}"'.format(ctx.root /
                                               'pw_crypto:ecdsa_boringssl'),
     )
-    build.ninja(ctx.output_dir)
+    build.ninja(ctx.output_dir,
+                *_at_all_optimization_levels(f'host_{_HOST_COMPILER}'))
 
 
 @_BUILD_FILE_FILTER.apply_to_check()
@@ -223,7 +225,8 @@
         pw_crypto_ECDSA_BACKEND='"{}"'.format(ctx.root /
                                               'pw_crypto:ecdsa_uecc'),
     )
-    build.ninja(ctx.output_dir)
+    build.ninja(ctx.output_dir,
+                *_at_all_optimization_levels(f'host_{_HOST_COMPILER}'))
 
 
 @_BUILD_FILE_FILTER.apply_to_check()