Skip to content

Commit 0777c5d

Browse files
committed
Trying to fix Windows build...
1 parent faf7a11 commit 0777c5d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,5 @@ workflows:
223223
test-all:
224224
jobs:
225225
- test-llvm11-go115
226-
- test-llvm12-go116
227-
- build-macos
226+
#- test-llvm12-go116
227+
#- build-macos

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,13 @@ ifeq ($(OS),Windows_NT)
5959

6060
BINARYEN_OPTION += -DCMAKE_EXE_LINKER_FLAGS='-static-libgcc -static-libstdc++'
6161

62-
LIBCLANG_NAME = libclang
63-
6462
else ifeq ($(shell uname -s),Darwin)
6563
MD5SUM = md5
66-
LIBCLANG_NAME = clang
6764
else ifeq ($(shell uname -s),FreeBSD)
6865
MD5SUM = md5
69-
LIBCLANG_NAME = clang
7066
START_GROUP = -Wl,--start-group
7167
END_GROUP = -Wl,--end-group
7268
else
73-
LIBCLANG_NAME = clang
7469
START_GROUP = -Wl,--start-group
7570
END_GROUP = -Wl,--end-group
7671
endif
@@ -86,19 +81,22 @@ LLD_LIBS = $(START_GROUP) $(addprefix -l,$(LLD_LIB_NAMES)) $(END_GROUP)
8681
# Other libraries that are needed to link TinyGo.
8782
EXTRA_LIB_NAMES = LLVMInterpreter
8883

84+
# All libraries to be built and linked with the tinygo binary (lib/lib*.a).
85+
LIB_NAMES = clang $(CLANG_LIB_NAMES) $(LLD_LIB_NAMES) $(EXTRA_LIB_NAMES)
86+
8987
# These build targets appear to be the only ones necessary to build all TinyGo
9088
# dependencies. Only building a subset significantly speeds up rebuilding LLVM.
9189
# The Makefile rules convert a name like lldELF to lib/liblldELF.a to match the
9290
# library path (for ninja).
9391
# This list also includes a few tools that are necessary as part of the full
9492
# TinyGo build.
95-
NINJA_BUILD_TARGETS = clang llvm-config llvm-ar llvm-nm $(addprefix lib/lib,$(addsuffix .a,$(LIBCLANG_NAME) $(CLANG_LIB_NAMES) $(LLD_LIB_NAMES) $(EXTRA_LIB_NAMES)))
93+
NINJA_BUILD_TARGETS = clang llvm-config llvm-ar llvm-nm $(addprefix lib/lib,$(addsuffix .a,$(LIB_NAMES)))
9694

9795
# For static linking.
9896
ifneq ("$(wildcard $(LLVM_BUILDDIR)/bin/llvm-config*)","")
9997
CGO_CPPFLAGS+=$(shell $(LLVM_BUILDDIR)/bin/llvm-config --cppflags) -I$(abspath $(LLVM_BUILDDIR))/tools/clang/include -I$(abspath $(CLANG_SRC))/include -I$(abspath $(LLD_SRC))/include
10098
CGO_CXXFLAGS=-std=c++14
101-
CGO_LDFLAGS+=$(abspath $(LLVM_BUILDDIR))/lib/lib$(LIBCLANG_NAME).a -L$(abspath $(LLVM_BUILDDIR)/lib) $(CLANG_LIBS) $(LLD_LIBS) $(shell $(LLVM_BUILDDIR)/bin/llvm-config --ldflags --libs --system-libs $(LLVM_COMPONENTS)) -lstdc++ $(CGO_LDFLAGS_EXTRA)
99+
CGO_LDFLAGS+=-L$(abspath $(LLVM_BUILDDIR)/lib) -lclang $(CLANG_LIBS) $(LLD_LIBS) $(shell $(LLVM_BUILDDIR)/bin/llvm-config --ldflags --libs --system-libs $(LLVM_COMPONENTS)) -lstdc++ $(CGO_LDFLAGS_EXTRA)
102100
endif
103101

104102

0 commit comments

Comments
 (0)