]>
Commit | Line | Data |
---|---|---|
f2b60f7d | 1 | include ../tools.mk |
1a4d82fc JJ |
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 | ||
b039eaaf SL |
9 | F := $(call NATIVE_STATICLIB_FILE,foo) |
10 | ||
11 | all: $(call NATIVE_STATICLIB,correct) $(call NATIVE_STATICLIB,wrong) | |
1a4d82fc | 12 | mkdir -p $(CORRECT_DIR) $(WRONG_DIR) |
b039eaaf SL |
13 | mv $(call NATIVE_STATICLIB,correct) $(CORRECT_DIR)/$(F) |
14 | mv $(call NATIVE_STATICLIB,wrong) $(WRONG_DIR)/$(F) | |
1a4d82fc JJ |
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) |