summary refs log tree commit diff
path: root/tests/run-make/link-framework/Makefile
blob: 96d832ad4a832929de9b274bc525db5ac50fc11e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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