diff --git a/src/build.sh b/src/build.sh index 10a9603f32..5af66ef372 100755 --- a/src/build.sh +++ b/src/build.sh @@ -68,4 +68,9 @@ export DEPOT_TOOLS_WIN_TOOLCHAIN=0 ./gn/out/gn gen "$out" --args="$flags $EXTRA_FLAGS" --script-executable=$PYTHON -ninja -C "$out" naive cronet cronet_static +cronet_targets="cronet cronet_static" +if echo "$EXTRA_FLAGS" | grep -q "build_static=true"; then + cronet_targets= +fi + +ninja -C "$out" naive $cronet_targets