aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/print_cmdline_flag.go
blob: 181ef8917b8e8d52df5bd430cf3e18e4633e4b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

func processPrintCmdlineFlag(builder *commandBuilder) {
	printCmd := false
	builder.transformArgs(func(arg builderArg) string {
		if arg.value == "-print-cmdline" {
			printCmd = true
			return ""
		}
		return arg.value
	})
	if printCmd {
		builder.env = &printingEnv{builder.env}
	}
}