mirror of
https://github.com/danog/gllvm.git
synced 2025-01-23 03:41:17 +01:00
fix arguments format in command call
This commit is contained in:
parent
b5603ce41d
commit
ccc998151f
@ -104,7 +104,7 @@ func attachBitcodePathToObject(bcFile, objFile string) {
|
||||
attachCmdArgs = []string{"-r", "-keep_private_externs", objFile, "-sectcreate", DARWIN_SEGMENT_NAME, DARWIN_SECTION_NAME, tmpFile.Name(), "-o", objFile}
|
||||
} else {
|
||||
attachCmd = "objcopy"
|
||||
attachCmdArgs = []string{"objcopy", "--add-section", ELF_SECTION_NAME, "=", tmpFile.Name(), objFile}
|
||||
attachCmdArgs = []string{"objcopy", "--add-section", ELF_SECTION_NAME+"="+tmpFile.Name(), objFile}
|
||||
}
|
||||
|
||||
// Run the attach command and ignore errors
|
||||
@ -163,7 +163,7 @@ func execCompile(compilerExecName string, pr ParserResult) {
|
||||
|
||||
// Executes a command then returns true if there was an error
|
||||
func execCmd(cmdExecName string, args []string) bool {
|
||||
cmd := exec.Command(cmdExecName, listToArgString(args))
|
||||
cmd := exec.Command(cmdExecName, args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if cmd.Run() == nil {
|
||||
@ -173,11 +173,6 @@ func execCmd(cmdExecName string, args []string) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// Joins a list of arguments to create a string
|
||||
func listToArgString(argList []string) string {
|
||||
return strings.Join(argList, " ")
|
||||
}
|
||||
|
||||
func getCompilerExecName(compilerName string) string {
|
||||
var compilerPath = os.Getenv(COMPILER_PATH)
|
||||
switch compilerName {
|
||||
|
Loading…
x
Reference in New Issue
Block a user