Sync build setup from Flutter. Change-Id: Ic7958dc42a79b7d2acd3f5279f816333ca31299e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351242 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>