aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/libc_exec.go
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-02-15 03:23:48 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-02-15 03:23:48 +0000
commit3b46527da85b8139d5fcf887387bcd4de20dec41 (patch)
tree35fa0fbaeaaddd9cc2a126a05eee3527b51e83a8 /compiler_wrapper/libc_exec.go
parent62564f20dc6f3a88caed664d54fc00dbf3bf7373 (diff)
parentb75f321fc8978b92ce3db6886ccb966768f0c7a8 (diff)
downloadtoolchain-utils-android11-d1-s5-release.tar.gz
Change-Id: I508eae962f523cfa857b4da7c77fdb8a70dfab1e
Diffstat (limited to 'compiler_wrapper/libc_exec.go')
-rw-r--r--compiler_wrapper/libc_exec.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler_wrapper/libc_exec.go b/compiler_wrapper/libc_exec.go
index 268221dc..f8db9d86 100644
--- a/compiler_wrapper/libc_exec.go
+++ b/compiler_wrapper/libc_exec.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// +build libc_exec
+
package main
// #include <errno.h>
@@ -26,7 +28,10 @@ import (
// LD_PRELOAD to work properly (e.g. gentoo sandbox).
// Note that this changes the go binary to be a dynamically linked one.
// See crbug.com/1000863 for details.
-func libcExec(env env, cmd *command) error {
+// To use this version of exec, please add '-tags libc_exec' when building Go binary.
+// Without the tags, libc_exec.go will be used.
+
+func execCmd(env env, cmd *command) error {
freeList := []unsafe.Pointer{}
defer func() {
for _, ptr := range freeList {