From d31c9250d3d6336a2704eb4bd08a360c3fead1c2 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 28 Sep 2021 11:38:33 +0300 Subject: [PATCH] ci: further makefile bootstrapping fixes --- GNUmakefile | 15 +++++++++------ Makefile | 7 +++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index e874f5b5f8..3f7c7d3717 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -84,13 +84,16 @@ endif all: latest_vc latest_tcc ifdef WIN32 - $(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) $(LDFLAGS) - $(V) -o v2.exe $(VFLAGS) cmd/v - move /y v2.exe v.exe + $(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS) + v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v + v2.exe -o $(V) $(VFLAGS) cmd/v + del v1.exe + del v2.exe else - $(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS) - $(V) -o v2.exe $(VFLAGS) cmd/v - mv -f v2.exe v + $(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS) + ./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v + ./v2.exe -o $(V) $(VFLAGS) cmd/v + rm -rf v1.exe v2.exe endif @echo "V has been successfully built" @$(V) -version diff --git a/Makefile b/Makefile index fe861748c3..671fdbf488 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ CC ?= cc +VFLAGS ?= all: rm -rf vc/ git clone --depth 1 --quiet https://github.com/vlang/vc - $(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v vc/v.c -lm -lexecinfo - rm -rf vc/ + $(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v1 vc/v.c -lm -lexecinfo + ./v1 -no-parallel -o v2 $(VFLAGS) cmd/v + ./v2 -o v $(VFLAGS) cmd/v + rm -rf v1 v2 vc/ @echo "V has been successfully built"