summaryrefslogtreecommitdiffstats
path: root/tests/run-make/macos-fat-archive/Makefile
blob: b6582c809e8b4df1ebb507e918b6f81adb4c563f (plain)
1
2
3
4
5
6
7
8
9
10
# only-macos

include ../tools.mk

"$(TMPDIR)"/libnative-library.a: native-library.c
	$(CC) -arch arm64 -arch x86_64 native-library.c -c -o "$(TMPDIR)"/native-library.o
	$(AR) crs "$(TMPDIR)"/libnative-library.a "$(TMPDIR)"/native-library.o

all: "$(TMPDIR)"/libnative-library.a
	$(RUSTC) lib.rs --crate-type=lib -L "native=$(TMPDIR)" -l static=native-library