[tools][setup-build] Preserve previous args.gn
Instead of clearing them every time we switch between build flavours.
Change-Id: I3a003a6fddadcd3ca82f9e89b74d77cd5ef8c2c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/154321
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
diff --git a/tools/setup-build b/tools/setup-build
index 817b363..1022b89 100755
--- a/tools/setup-build
+++ b/tools/setup-build
@@ -137,7 +137,11 @@
show_usage "invalid build architecture '$BUILD_ARCH'"
;;
esac
- generate "gn" "gen" "out/active" "--args=$GN_ARGS"
+ if [ -f "$ROOT_DIR/out/$BUILD_DIR/args.gn" ]; then
+ generate "gn" "gen" "out/active" # keep existing args
+ else
+ generate "gn" "gen" "out/active" "--args=$GN_ARGS"
+ fi
;;
"cmake")
CMAKE_FLAGS=()