]> git.proxmox.com Git - rustc.git/blob - src/test/run-make/simd-ffi/Makefile
Imported Upstream version 1.1.0+dfsg1
[rustc.git] / src / test / run-make / simd-ffi / Makefile
1 -include ../tools.mk
2
3 # construct a fairly exhaustive list of platforms that we
4 # support. These ones don't follow a pattern
5 TARGETS=arm-linux-androideabi arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabi
6
7 # these ones do, each OS lists the architectures it supports
8 LINUX=aarch64 i686 x86_64 mips mipsel
9 WINDOWS=i686 x86_64
10 # fails with: failed to get iphonesimulator SDK path: no such file or directory
11 #IOS=i386 aarch64 armv7
12 DARWIN=i686 x86_64
13
14 $(foreach arch,$(LINUX),$(eval TARGETS += $(arch)-unknown-linux-gnu))
15 $(foreach arch,$(WINDOWS),$(eval TARGETS += $(arch)-pc-windows-gnu))
16 #$(foreach arch,$(IOS),$(eval TARGETS += $(arch)-apple-ios))
17 $(foreach arch,$(DARWIN),$(eval TARGETS += $(arch)-apple-darwin))
18
19 all: $(TARGETS)
20
21 define MK_TARGETS
22 # compile the rust file to the given target, but only to asm and IR
23 # form, to avoid having to have an appropriate linker.
24 #
25 # we need some features because the integer SIMD instructions are not
26 # enabled by-default for i686 and ARM; these features will be invalid
27 # on some platforms, but LLVM just prints a warning so that's fine for
28 # now.
29 $(1): simd.rs
30 $$(RUSTC) --target=$(1) --emit=llvm-ir,asm simd.rs \
31 -C target-feature='+neon,+sse2' -C extra-filename=-$(1)
32 endef
33
34 $(foreach targetxxx,$(TARGETS),$(eval $(call MK_TARGETS,$(targetxxx))))