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