aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/bisect_flag.go
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-06-17 19:05:20 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-06-17 19:05:20 +0000
commit1fc276040d574012e4f46891409fa93b6f0fec11 (patch)
tree73936aba47fe1dc71e9cc05af9747036e935608c /compiler_wrapper/bisect_flag.go
parentb75f321fc8978b92ce3db6886ccb966768f0c7a8 (diff)
parent4e4201457e5f51a132101c611c79ccff9f713c8b (diff)
downloadtoolchain-utils-android12-mainline-mediaprovider-release.tar.gz
Change-Id: I025bd1851bc27970c5b4ef6a391e3e8edb26d9b4
Diffstat (limited to 'compiler_wrapper/bisect_flag.go')
-rw-r--r--compiler_wrapper/bisect_flag.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler_wrapper/bisect_flag.go b/compiler_wrapper/bisect_flag.go
index 8aec3e7e..adfa8b03 100644
--- a/compiler_wrapper/bisect_flag.go
+++ b/compiler_wrapper/bisect_flag.go
@@ -7,6 +7,7 @@ package main
import (
"errors"
"os"
+ "os/exec"
"path/filepath"
)
@@ -20,7 +21,7 @@ import sys
def ExpandArgs(args, target):
for arg in args:
if arg[0] == '@':
- with open(arg[1:], 'rb') as f:
+ with open(arg[1:], 'r', encoding='utf-8') as f:
ExpandArgs(shlex.split(f.read()), target)
else:
target.append(arg)
@@ -52,7 +53,7 @@ func calcBisectCommand(env env, cfg *config, bisectStage string, compilerCmd *co
}
}
absCompilerPath := getAbsCmdPath(env, compilerCmd)
- pythonPath, err := filepath.Abs(os.Args[0])
+ pythonPath, err := exec.LookPath(os.Args[0])
if err != nil {
return nil, err
}
@@ -64,7 +65,7 @@ func calcBisectCommand(env env, cfg *config, bisectStage string, compilerCmd *co
return &command{
Path: "/usr/bin/env",
Args: append([]string{
- "python",
+ "python3",
"-c",
bisectPythonCommand,
bisectStage,