2022-08-23 00:00:00 +00:00
|
|
|
include ../tools.mk
|
2015-02-06 13:40:00 -08:00
|
|
|
|
2019-01-06 16:27:57 -05:00
|
|
|
# ignore-freebsd
|
|
|
|
# ignore-openbsd
|
2023-03-16 14:18:07 +01:00
|
|
|
# ignore-solaris
|
2015-03-23 12:48:42 -07:00
|
|
|
|
2015-02-06 13:40:00 -08:00
|
|
|
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)
|