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