mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 22:43:40 +00:00
compiler: move optimizer into the binary
This commit is contained in:
@@ -94,14 +94,9 @@ build/tgo: *.go
|
||||
go build -o build/tgo -i .
|
||||
|
||||
# Build IR with the Go compiler.
|
||||
build/%.bc: src/examples/% src/examples/%/*.go build/tgo src/runtime/*.go build/runtime-$(TARGET)-combined.bc
|
||||
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/,,$<)
|
||||
|
||||
# Compile and optimize bitcode file.
|
||||
build/%.o: build/%.bc
|
||||
$(OPT) -Oz -enable-coroutines -o $< $<
|
||||
$(LLC) -filetype=obj -o $@ $<
|
||||
|
||||
# Compile C sources for the runtime.
|
||||
build/%.bc: src/runtime/%.c src/runtime/*.h
|
||||
@mkdir -p build
|
||||
|
||||
Reference in New Issue
Block a user