aboutsummaryrefslogtreecommitdiffhomepage
path: root/builder/tools.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-09-28 19:57:22 +0200
committerRon Evans <[email protected]>2021-10-05 06:26:21 +0200
commitdbfaaf7c130cec414e272531daa308ae442a7afe (patch)
tree2c44fc6e24cdce4221a2bc22aa99c2cba24f4822 /builder/tools.go
parent878b62bbe8eb11a1783c722a730ea0ec9d8022ab (diff)
downloadtinygo-dbfaaf7c130cec414e272531daa308ae442a7afe.tar.gz
tinygo-dbfaaf7c130cec414e272531daa308ae442a7afe.zip
main: implement `tinygo lldb` subcommand
LLDB mostly works on most platforms, but it is still lacking in some features. For example, it doesn't seem to support RISC-V yet (coming in LLVM 12), it only partially supports AVR (no stacktraces), and it doesn't seem to support the Ctrl-C keyboard command when running a binary for another platform (e.g. with GOOS=arm64). However, it does mostly work, even on baremetal systems.
Diffstat (limited to 'builder/tools.go')
-rw-r--r--builder/tools.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/builder/tools.go b/builder/tools.go
index 0b6cd37f9..53d89bf0d 100644
--- a/builder/tools.go
+++ b/builder/tools.go
@@ -24,7 +24,7 @@ func runCCompiler(flags ...string) error {
}
// Compile this with an external invocation of the Clang compiler.
- return execCommand(commands["clang"], flags...)
+ return execCommand("clang", flags...)
}
// link invokes a linker with the given name and flags.
@@ -38,8 +38,8 @@ func link(linker string, flags ...string) error {
}
// Fall back to external command.
- if cmdNames, ok := commands[linker]; ok {
- return execCommand(cmdNames, flags...)
+ if _, ok := commands[linker]; ok {
+ return execCommand(linker, flags...)
}
cmd := exec.Command(linker, flags...)