rust/tests/run-make/link-framework/Makefile
Mads Marquart e6b9bb7b72 Make more of the test suite run on Mac Catalyst
This adds the `only-apple`/`ignore-apple` compiletest directive, and
uses that basically everywhere instead of `only-macos`/`ignore-macos`.

Some of the updates in `run-make` are a bit redundant, as they use
`ignore-cross-compile` and won't run on iOS - but using Apple in these
is still more correct, so I've made that change anyhow.
2024-05-28 12:31:33 +02:00

24 lines
669 B
Makefile

# only-apple
#
# Check that linking to a framework actually makes it to the linker.
include ../tools.mk
all:
$(RUSTC) dep-link-framework.rs
$(RUSTC) dep-link-weak-framework.rs
$(RUSTC) empty.rs
otool -L $(TMPDIR)/no-link | $(CGREP) -v CoreFoundation
$(RUSTC) link-framework.rs
otool -L $(TMPDIR)/link-framework | $(CGREP) CoreFoundation | $(CGREP) -v weak
$(RUSTC) link-weak-framework.rs
otool -L $(TMPDIR)/link-weak-framework | $(CGREP) CoreFoundation | $(CGREP) weak
# When linking the framework both normally, and weakly, the weak linking takes preference
$(RUSTC) link-both.rs
otool -L $(TMPDIR)/link-both | $(CGREP) CoreFoundation | $(CGREP) weak