]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | -include ../tools.mk |
2 | ||
2c00a5a8 XL |
3 | ifeq ($(UNAME),Darwin) |
4 | PLUGIN_FLAGS := -C link-args=-Wl,-undefined,dynamic_lookup | |
5 | endif | |
6 | ||
3b2f2976 XL |
7 | ifeq ($(findstring stage1,$(RUST_BUILD_STAGE)),stage1) |
8 | # ignore stage1 | |
9 | all: | |
10 | ||
11 | else | |
7453a54e SL |
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) | |
2c00a5a8 | 18 | $(RUSTC) plugin.rs -C prefer-dynamic $(PLUGIN_FLAGS) |
7453a54e SL |
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 | |
3b2f2976 XL |
27 | |
28 | endif |