]> git.lizzy.rs Git - rust.git/blob - src/test/run-make/llvm-pass/Makefile
rustc: Load the `rustc_trans` crate at runtime
[rust.git] / src / test / run-make / llvm-pass / Makefile
1 -include ../tools.mk
2
3 ifeq ($(UNAME),Darwin)
4 PLUGIN_FLAGS := -C link-args=-Wl,-undefined,dynamic_lookup
5 endif
6
7 ifeq ($(findstring stage1,$(RUST_BUILD_STAGE)),stage1)
8 # ignore stage1
9 all:
10
11 else
12 # Windows doesn't correctly handle include statements with escaping paths,
13 # so this test will not get run on Windows.
14 ifdef IS_WINDOWS
15 all:
16 else
17 all: $(call NATIVE_STATICLIB,llvm-function-pass) $(call NATIVE_STATICLIB,llvm-module-pass)
18         $(RUSTC) plugin.rs -C prefer-dynamic $(PLUGIN_FLAGS)
19         $(RUSTC) main.rs
20
21 $(TMPDIR)/libllvm-function-pass.o:
22         $(CXX) $(CFLAGS) $(LLVM_CXXFLAGS) -c llvm-function-pass.so.cc -o $(TMPDIR)/libllvm-function-pass.o
23
24 $(TMPDIR)/libllvm-module-pass.o:
25         $(CXX) $(CFLAGS) $(LLVM_CXXFLAGS) -c llvm-module-pass.so.cc -o $(TMPDIR)/libllvm-module-pass.o
26 endif
27
28 endif