pw_presubmit: Help prevent undefined GN build args
- Add the --fail-on-unused-args option to gn gen by default in
presubmit.
- Import .gni files for backend build args into the toolchains
that set them.
- Skip the init_cipd and init_virtualenv steps in local presubmits.
Instead, use the current environment. This is much faster and avoids
confusion about which environment is in use.
Fixes: 294
Change-Id: Ib86da7c3d4560b6c92cbacced725ee54c485e3d6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/27580
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Michael Spang <spang@google.com>
diff --git a/pw_sync/BUILD.gn b/pw_sync/BUILD.gn
index 058c4f0..615c3db 100644
--- a/pw_sync/BUILD.gn
+++ b/pw_sync/BUILD.gn
@@ -18,20 +18,7 @@
import("$dir_pw_build/target_types.gni")
import("$dir_pw_docgen/docs.gni")
import("$dir_pw_unit_test/test.gni")
-
-declare_args() {
- # Backend for the pw_sync module's binary semaphore.
- pw_sync_BINARY_SEMAPHORE_BACKEND = ""
-
- # Backend for the pw_sync module's counting semaphore.
- pw_sync_COUNTING_SEMAPHORE_BACKEND = ""
-
- # Backend for the pw_sync module's mutex.
- pw_sync_MUTEX_BACKEND = ""
-
- # Backend for the pw_sync module's spin lock.
- pw_sync_SPIN_LOCK_BACKEND = ""
-}
+import("backend.gni")
config("public_include_path") {
include_dirs = [ "public" ]