]> git.proxmox.com Git - rustc.git/blob - src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / run-make-fulldeps / c-unwind-abi-catch-lib-panic / Makefile
1 include ../tools.mk
2
3 all: archive
4 # Compile `main.rs`, which will link into our library, and run it.
5 $(RUSTC) main.rs
6 $(call RUN,main)
7
8 ifdef IS_MSVC
9 archive: add.o panic.o
10 # Now, create an archive using these two objects.
11 $(AR) crus $(TMPDIR)/add.lib $(TMPDIR)/add.o $(TMPDIR)/panic.o
12 else
13 archive: add.o panic.o
14 # Now, create an archive using these two objects.
15 $(AR) crus $(TMPDIR)/libadd.a $(TMPDIR)/add.o $(TMPDIR)/panic.o
16 endif
17
18 # Compile `panic.rs` into an object file.
19 #
20 # Note that we invoke `rustc` directly, so we may emit an object rather
21 # than an archive. We'll do that later.
22 panic.o:
23 $(BARE_RUSTC) $(RUSTFLAGS) \
24 --out-dir $(TMPDIR) \
25 --emit=obj panic.rs
26
27 # Compile `add.c` into an object file.
28 add.o:
29 $(call COMPILE_OBJ,$(TMPDIR)/add.o,add.c)
30