summary refs log tree commit diff
path: root/src/test/run-make/use-extern-for-plugins/Makefile
blob: c67bd3d82ef6be609be7a5f1e14fff085aca69bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-include ../tools.mk

SKIP_OS := 'FreeBSD OpenBSD Bitrig'

ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))

HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
ifeq ($(findstring i686,$(HOST)),i686)
TARGET := $(subst i686,x86_64,$(HOST))
else
TARGET := $(subst x86_64,i686,$(HOST))
endif

all:
	$(RUSTC) foo.rs -C extra-filename=-host
	$(RUSTC) bar.rs -C extra-filename=-targ --target $(TARGET)
	$(RUSTC) baz.rs --extern a=$(TMPDIR)/liba-targ.rlib --target $(TARGET)
else
# FreeBSD, OpenBSD, and Bitrig support only x86_64 architecture for now
all:
endif