2016-04-17 06:49:26 -05:00
|
|
|
-include ../tools.mk
|
|
|
|
|
|
|
|
# This tests ensure that atomic types are never lowered into runtime library calls that are not
|
|
|
|
# guaranteed to be lock-free.
|
|
|
|
|
|
|
|
all:
|
|
|
|
ifeq ($(UNAME),Linux)
|
2016-09-08 04:43:21 -05:00
|
|
|
ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86)
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=i686-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=x86_64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 04:43:21 -05:00
|
|
|
endif
|
|
|
|
ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm)
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=arm-unknown-linux-gnueabi atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=arm-unknown-linux-gnueabihf atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=armv7-unknown-linux-gnueabihf atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 04:43:21 -05:00
|
|
|
endif
|
|
|
|
ifeq ($(filter aarch64,$(LLVM_COMPONENTS)),aarch64)
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=aarch64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 04:43:21 -05:00
|
|
|
endif
|
|
|
|
ifeq ($(filter mips,$(LLVM_COMPONENTS)),mips)
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=mips-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=mipsel-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 04:43:21 -05:00
|
|
|
endif
|
|
|
|
ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-09 16:00:23 -05:00
|
|
|
$(RUSTC) --target=s390x-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 09:19:50 -06:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 06:49:26 -05:00
|
|
|
endif
|
2016-09-08 04:43:21 -05:00
|
|
|
endif
|