2022-08-23 00:00:00 +00:00
|
|
|
include ../tools.mk
|
2016-04-17 11:49:26 +00:00
|
|
|
|
|
|
|
# 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 09:43:21 +00:00
|
|
|
ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86)
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=i686-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=x86_64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 09:43:21 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm)
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=arm-unknown-linux-gnueabi atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=arm-unknown-linux-gnueabihf atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=armv7-unknown-linux-gnueabihf atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2018-06-04 08:44:30 +00:00
|
|
|
$(RUSTC) --target=thumbv7neon-unknown-linux-gnueabihf atomic_lock_free.rs
|
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 09:43:21 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(filter aarch64,$(LLVM_COMPONENTS)),aarch64)
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=aarch64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 09:43:21 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(filter mips,$(LLVM_COMPONENTS)),mips)
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=mips-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=mipsel-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-09-08 09:43:21 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2018-02-23 21:46:48 +00:00
|
|
|
$(RUSTC) --target=powerpc-unknown-linux-gnuspe atomic_lock_free.rs
|
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2018-02-24 00:15:48 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(filter systemz,$(LLVM_COMPONENTS)),systemz)
|
2016-09-09 21:00:23 +00:00
|
|
|
$(RUSTC) --target=s390x-unknown-linux-gnu atomic_lock_free.rs
|
2017-11-23 15:19:50 +00:00
|
|
|
nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
|
2016-04-17 11:49:26 +00:00
|
|
|
endif
|
2016-09-08 09:43:21 +00:00
|
|
|
endif
|