Skip to content

Commit 3d80f56

Browse files
committed
Makefile: add Makefile
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 9c1e3f5 commit 3d80f56

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.PHONY: all test docker/test
2+
3+
export CC := clang
4+
export CXX := clang++
5+
6+
LLVM_LIBDIR?=$(shell llvm-config --libdir)
7+
LLVM_VERSION?=15
8+
9+
GO_TEST_FUNC?=.
10+
11+
all: test
12+
13+
test:
14+
CGO_LDFLAGS="-L${LLVM_LIBDIR} -Wl,-rpath,${LLVM_LIBDIR}" go test -v -race -shuffle=on -run=${GO_TEST_FUNC} ./...
15+
16+
docker/test:
17+
docker container run --rm -it -e GO_TEST_FUNC=${GO_TEST_FUNC} --mount type=bind,src=$(CURDIR),dst=/go/src/github.com/go-clang/clang-v${LLVM_VERSION} -w /go/src/github.com/go-clang/clang-v${LLVM_VERSION} ghcr.io/go-clang/base:${LLVM_VERSION} make test

0 commit comments

Comments
 (0)