Skip to content

Commit 7731519

Browse files
committed
make: use buildmode flag to set exe for windows to use standard linker
Signed-off-by: deadprogram <[email protected]>
1 parent c4363d5 commit 7731519

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a:
179179
# Build the Go compiler.
180180
tinygo:
181181
@if [ ! -f "$(LLVM_BUILDDIR)/bin/llvm-config" ]; then echo "Fetch and build LLVM first by running:"; echo " make llvm-source"; echo " make $(LLVM_BUILDDIR)"; exit 1; fi
182-
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build -o build/tinygo$(EXE) -tags byollvm .
182+
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build -buildmode exe -o build/tinygo$(EXE) -tags byollvm .
183183

184184
test: wasi-libc
185-
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) test -v -tags byollvm ./cgo ./compileopts ./interp ./transform .
185+
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) test -v -buildmode exe -tags byollvm ./cgo ./compileopts ./interp ./transform .
186186

187187
tinygo-test:
188188
cd tests/tinygotest && tinygo test
@@ -346,7 +346,7 @@ endif
346346
@$(MD5SUM) test.elf
347347

348348
wasmtest:
349-
$(GO) test ./tests/wasm
349+
$(GO) test -buildmode exe ./tests/wasm
350350

351351
build/release: tinygo gen-device wasi-libc
352352
@mkdir -p build/release/tinygo/bin

0 commit comments

Comments
 (0)