]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/link-path-order/Makefile
Rollup merge of #100924 - est31:closure_to_fn_ptr, r=Mark-Simulacrum
[rust.git] / src / test / run-make-fulldeps / link-path-order / Makefile
1 include ../tools.mk
2
3 # Verifies that the -L arguments given to the linker is in the same order
4 # as the -L arguments on the rustc command line.
5
6 CORRECT_DIR=$(TMPDIR)/correct
7 WRONG_DIR=$(TMPDIR)/wrong
8
9 F := $(call NATIVE_STATICLIB_FILE,foo)
10
11 all: $(call NATIVE_STATICLIB,correct) $(call NATIVE_STATICLIB,wrong)
12         mkdir -p $(CORRECT_DIR) $(WRONG_DIR)
13         mv $(call NATIVE_STATICLIB,correct) $(CORRECT_DIR)/$(F)
14         mv $(call NATIVE_STATICLIB,wrong) $(WRONG_DIR)/$(F)
15         $(RUSTC) main.rs -o $(TMPDIR)/should_succeed -L $(CORRECT_DIR) -L $(WRONG_DIR)
16         $(call RUN,should_succeed)
17         $(RUSTC) main.rs -o $(TMPDIR)/should_fail -L $(WRONG_DIR) -L $(CORRECT_DIR)
18         $(call FAIL,should_fail)