Skip to content

Commit 5592ee6

Browse files
committed
WIP try to fix LLVM 11
1 parent a883ea5 commit 5592ee6

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,10 @@ workflows:
392392
test-all:
393393
jobs:
394394
- test-llvm9-go111
395-
- test-llvm10-go112
396-
- test-llvm10-go113
397-
- test-llvm10-go114
398-
- test-llvm11-go115
399-
- build-linux
400-
- build-macos
401-
- assert-test-linux
395+
#- test-llvm10-go112
396+
#- test-llvm10-go113
397+
#- test-llvm10-go114
398+
#- test-llvm11-go115
399+
#- build-linux
400+
#- build-macos
401+
#- assert-test-linux

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ifeq ($(OS),Windows_NT)
4848
# LLVM compiled using MinGW on Windows appears to have problems with threads.
4949
# Without this flag, linking results in errors like these:
5050
# libLLVMSupport.a(Threading.cpp.obj):Threading.cpp:(.text+0x55): undefined reference to `std::thread::hardware_concurrency()'
51-
LLVM_OPTION += -DLLVM_ENABLE_THREADS=OFF
51+
LLVM_OPTION += -DLLVM_ENABLE_THREADS=OFF -DLIBCLANG_BUILD_STATIC=ON
5252

5353
CGO_LDFLAGS += -static -static-libgcc -static-libstdc++
5454
CGO_LDFLAGS_EXTRA += -lversion
@@ -57,6 +57,7 @@ ifeq ($(OS),Windows_NT)
5757
# doesn't allow building libclang as a static library.
5858
LIBCLANG_PATH = $(abspath build/libclang-custom.a)
5959
LIBCLANG_FILES = $(abspath $(wildcard $(LLVM_BUILDDIR)/tools/clang/tools/libclang/CMakeFiles/libclang.dir/*.cpp.obj))
60+
#LIBCLANG_PATH = $(abspath $(LLVM_BUILDDIR))/lib/liblibclang.dll.a
6061

6162
# Add the libclang dependency to the tinygo binary target.
6263
tinygo: $(LIBCLANG_PATH)

azure-pipelines.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- task: CacheBeta@0
3333
displayName: Cache LLVM build
3434
inputs:
35-
key: llvm-build-11-windows-v1
35+
key: llvm-build-11-windows-v2
3636
path: llvm-build
3737
- task: Bash@3
3838
displayName: Build LLVM
@@ -48,11 +48,11 @@ jobs:
4848
# build!
4949
make llvm-build
5050
fi
51-
- task: Bash@3
52-
displayName: Install QEMU
53-
inputs:
54-
targetType: inline
55-
script: choco install qemu --version=2020.06.12
51+
#- task: Bash@3
52+
# displayName: Install QEMU
53+
# inputs:
54+
# targetType: inline
55+
# script: choco install qemu --version=2020.06.12
5656
- task: CacheBeta@0
5757
displayName: Cache wasi-libc sysroot
5858
inputs:
@@ -63,21 +63,17 @@ jobs:
6363
inputs:
6464
targetType: inline
6565
script: PATH=/usr/bin:$PATH make wasi-libc
66-
- task: Bash@3
67-
displayName: Test TinyGo
68-
inputs:
69-
targetType: inline
70-
script: |
71-
export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu"
72-
unset GOROOT
73-
make test
7466
- task: Bash@3
7567
displayName: Build TinyGo release tarball
7668
inputs:
7769
targetType: inline
7870
script: |
7971
export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu"
8072
unset GOROOT
73+
grep -r clang_Type_getAlignOf llvm-build
74+
grep -r __imp_clang_Type_getAlignOf llvm-build
75+
ls -l llvm-build/lib llvm-build/tools/clang/tools/libclang/CMakeFiles/*
76+
make
8177
make build/release -j4
8278
- publish: $(System.DefaultWorkingDirectory)/build/release/tinygo
8379
displayName: Publish zip as artifact
@@ -90,3 +86,11 @@ jobs:
9086
export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu"
9187
unset GOROOT
9288
make smoketest TINYGO=build/tinygo AVR=0 XTENSA=0
89+
- task: Bash@3
90+
displayName: Test TinyGo
91+
inputs:
92+
targetType: inline
93+
script: |
94+
export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu"
95+
unset GOROOT
96+
make test

0 commit comments

Comments
 (0)