compiler: move optimizer into the binary

This commit is contained in:
Ayke van Laethem
2018-09-04 18:55:47 +02:00
parent c109ec0955
commit 0746d61639
3 changed files with 14 additions and 10 deletions
+1 -6
View File
@@ -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