Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit ce36773

Browse files
committed
cmd/llgo-build: compile C output to workdir
1 parent 19679fe commit ce36773

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/llgo-build/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func buildPackage(pkg *build.Package, output string) error {
247247
// Compile and link .c files in.
248248
llvmlink := filepath.Join(llvmbindir, "llvm-link")
249249
for _, cfile := range pkg.CFiles {
250-
bcfile := cfile + ".bc"
250+
bcfile := filepath.Join(workdir, filepath.Base(cfile+".bc"))
251251
args = []string{"-c", "-o", bcfile}
252252
if triple != "pnacl" {
253253
args = append(args, "-target", triple, "-emit-llvm")

0 commit comments

Comments
 (0)