compiler: improve command line argument parsing

To get more compatibility with the go command, implement a similar
command line interface (with "tinygo build <package>" etc.).
Other than that, an all-round cleanup of command parsing.
This commit is contained in:
Ayke van Laethem
2018-09-11 20:26:13 +02:00
parent 81b9edbe65
commit 0779ee6088
2 changed files with 29 additions and 8 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ build/tgo: *.go
# Build IR with the Go compiler.
build/%.o: src/examples/% src/examples/%/*.go build/tgo src/runtime/*.go build/runtime-$(TARGET)-combined.bc
./build/tgo $(TGOFLAGS) -runtime build/runtime-$(TARGET)-combined.bc -o $@ $(subst src/,,$<)
./build/tgo build $(TGOFLAGS) -runtime build/runtime-$(TARGET)-combined.bc -o $@ $(subst src/,,$<)
# Compile C sources for the runtime.
build/%.bc: src/runtime/%.c src/runtime/*.h