Files
rk35xx-android14/external/toolchain-utils/compiler_wrapper/go_exec.go
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

25 lines
620 B
Go

// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//go:build !libc_exec
// +build !libc_exec
package main
import (
"os/exec"
"syscall"
)
// Implement exec for users that don't need to dynamically link with glibc
// See b/144783188 and libc_exec.go.
func execCmd(env env, cmd *command) error {
execCmd := exec.Command(cmd.Path, cmd.Args...)
mergedEnv := mergeEnvValues(env.environ(), cmd.EnvUpdates)
ret := syscall.Exec(execCmd.Path, execCmd.Args, mergedEnv)
return newErrorwithSourceLocf("exec error: %v", ret)
}