Skip to content

Commit cf3b782

Browse files
PureWhiteWuaykevl
authored andcommitted
feat: support build on darwin arm64
1 parent 205638a commit cf3b782

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ UNAME_S:=$(shell uname -s)
1313

1414
GOOS := $(shell go env GOOS)
1515

16+
# TODO: fix this for darwin-arm64
1617
LDFLAGS = $(shell $(CONFIG) --ldflags --libs --system-libs $(COMPONENTS))
1718
ifeq ($(BUILDDIR),)
1819
ifeq ($(UNAME_S),Darwin)

llvm_config_darwin.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
//go:build !byollvm
12
// +build !byollvm
23

34
package llvm
45

56
// Automatically generated by `make config BUILDDIR=`, do not edit.
67

7-
// #cgo CPPFLAGS: -I/usr/local/opt/llvm@11/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
8-
// #cgo CXXFLAGS: -std=c++14
9-
// #cgo LDFLAGS: -L/usr/local/opt/llvm@11/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM -lz -lcurses -lm -lxml2 -L/usr/local/opt/libffi/lib -lffi
8+
// #cgo amd64 CPPFLAGS: -I/usr/local/opt/llvm@11/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
9+
// #cgo amd64 CXXFLAGS: -std=c++14
10+
// #cgo amd64 LDFLAGS: -L/usr/local/opt/llvm@11/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM -lz -lcurses -lm -lxml2 -L/usr/local/opt/libffi/lib -lffi
11+
// #cgo arm64 CPPFLAGS: -I/opt/homebrew/opt/llvm@11/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
12+
// #cgo arm64 CXXFLAGS: -std=c++14
13+
// #cgo arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@11/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM -lz -lcurses -lm -lxml2 -L/opt/homebrew/opt/libffi/lib -lffi
1014
import "C"
1115

1216
type run_build_sh int

0 commit comments

Comments
 (0)