]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile
Ignore LLVM-dependent run-make tests on Windows
[rust.git] / src / test / run-make-fulldeps / cross-lang-lto-upstream-rlibs / Makefile
1 -include ../tools.mk
2
3 # ignore windows due to libLLVM being present in PATH and the PATH and library path being the same
4 # (so fixing it is harder). See #57765 for context
5 ifndef IS_WINDOWS
6
7 # This test makes sure that we don't loose upstream object files when compiling
8 # staticlibs with -Zcross-lang-lto
9
10 all: staticlib.rs upstream.rs
11         $(RUSTC) upstream.rs -Z cross-lang-lto -Ccodegen-units=1
12
13         # Check No LTO
14         $(RUSTC) staticlib.rs -Z cross-lang-lto -Ccodegen-units=1 -L. -o $(TMPDIR)/staticlib.a
15         (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a)
16         # Make sure the upstream object file was included
17         ls $(TMPDIR)/upstream.*.rcgu.o
18
19         # Cleanup
20         rm $(TMPDIR)/*
21
22         # Check ThinLTO
23         $(RUSTC) upstream.rs -Z cross-lang-lto -Ccodegen-units=1 -Clto=thin
24         $(RUSTC) staticlib.rs -Z cross-lang-lto -Ccodegen-units=1 -Clto=thin -L. -o $(TMPDIR)/staticlib.a
25         (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a)
26         ls $(TMPDIR)/upstream.*.rcgu.o
27
28 else
29
30 all:
31
32 endif