1// Copyright 2019 The Chromium OS Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5package main 6 7func processPrintCmdlineFlag(builder *commandBuilder) { 8 printCmd := false 9 builder.transformArgs(func(arg builderArg) string { 10 if arg.value == "-print-cmdline" { 11 printCmd = true 12 return "" 13 } 14 return arg.value 15 }) 16 if printCmd { 17 builder.env = &printingEnv{builder.env} 18 } 19} 20