diff options
author | Tobias Bosch <tbosch@google.com> | 2019-07-11 04:24:52 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-07-13 12:29:19 +0000 |
commit | 584728183f90cf6ef27fa09b52c8ee5203c87e4a (patch) | |
tree | 4d725a5553ab177f66b86c27075935ee5827cae3 /compiler_wrapper/compiler_wrapper.go | |
parent | 6652ca32cb1194acb1771121189f1531c3644402 (diff) | |
download | toolchain-utils-584728183f90cf6ef27fa09b52c8ee5203c87e4a.tar.gz |
Add -print-cmdline and -print-config
BUG=chromium:773875
TEST=unit test
Change-Id: Ib25e582257694f3a3457795873a249735e3aaf82
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1697931
Tested-by: Tobias Bosch <tbosch@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/compiler_wrapper.go')
-rw-r--r-- | compiler_wrapper/compiler_wrapper.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler_wrapper/compiler_wrapper.go b/compiler_wrapper/compiler_wrapper.go index b0269abe..314a8a71 100644 --- a/compiler_wrapper/compiler_wrapper.go +++ b/compiler_wrapper/compiler_wrapper.go @@ -43,6 +43,9 @@ func callCompilerInternal(env env, cfg *config, inputCmd *command) (exitCode int if err != nil { return 0, err } + processPrintConfigFlag(mainBuilder) + processPrintCmdlineFlag(mainBuilder) + env = mainBuilder.env var compilerCmd *command clangSyntax := processClangSyntaxFlag(mainBuilder) if mainBuilder.target.compilerType == clangType { @@ -133,10 +136,8 @@ func processGomaCCacheFlags(sysroot string, builder *commandBuilder) { } } -func getAbsWrapperDir(env env, wrapperPath string) (string, error) { - if !filepath.IsAbs(wrapperPath) { - wrapperPath = filepath.Join(env.getwd(), wrapperPath) - } +func getAbsWrapperDir(env env, wrapperCmd *command) (string, error) { + wrapperPath := getAbsCmdPath(env, wrapperCmd) evaledCmdPath, err := filepath.EvalSymlinks(wrapperPath) if err != nil { return "", wrapErrorwithSourceLocf(err, "failed to evaluate symlinks for %s", wrapperPath) |