aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/command.go')
-rw-r--r--compiler_wrapper/command.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler_wrapper/command.go b/compiler_wrapper/command.go
index 8b9fa235..95fce7e7 100644
--- a/compiler_wrapper/command.go
+++ b/compiler_wrapper/command.go
@@ -134,7 +134,12 @@ func newCommandBuilder(env env, cfg *config, cmd *command) (*commandBuilder, err
if err != nil {
return nil, err
}
- rootPath := filepath.Join(filepath.Dir(absWrapperPath), cfg.rootRelPath)
+ var rootPath string
+ if compilerType == gccType {
+ rootPath = filepath.Join(filepath.Dir(absWrapperPath), cfg.gccRootRelPath)
+ } else {
+ rootPath = filepath.Join(filepath.Dir(absWrapperPath), cfg.clangRootRelPath)
+ }
return &commandBuilder{
path: cmd.Path,
args: createBuilderArgs( /*fromUser=*/ true, cmd.Args),