diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-17 19:05:20 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-17 19:05:20 +0000 |
commit | 1fc276040d574012e4f46891409fa93b6f0fec11 (patch) | |
tree | 73936aba47fe1dc71e9cc05af9747036e935608c /compiler_wrapper/bisect_flag.go | |
parent | b75f321fc8978b92ce3db6886ccb966768f0c7a8 (diff) | |
parent | 4e4201457e5f51a132101c611c79ccff9f713c8b (diff) | |
download | toolchain-utils-android12-mainline-mediaprovider-release.tar.gz |
Snap for 7468467 from 4e4201457e5f51a132101c611c79ccff9f713c8b to mainline-mediaprovider-releaseandroid-mainline-12.0.0_r90android-mainline-12.0.0_r76android-mainline-12.0.0_r48android-mainline-12.0.0_r31android-mainline-12.0.0_r121android-mainline-12.0.0_r11android-mainline-12.0.0_r106aml_mpr_311911090android12-mainline-mediaprovider-release
Change-Id: I025bd1851bc27970c5b4ef6a391e3e8edb26d9b4
Diffstat (limited to 'compiler_wrapper/bisect_flag.go')
-rw-r--r-- | compiler_wrapper/bisect_flag.go | 7 |
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, |