Skip to content

Commit e6d3308

Browse files
committed
Add .def file support to the new build system (which does nothing at the moment since I don't know how to use .defs on MinGW)
1 parent 700c946 commit e6d3308

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Makefile.in

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ RUNTIME_HDR := rt/globals.h \
311311
rt/test/rust_test_runtime.h \
312312
rt/test/rust_test_util.h
313313

314+
RUNTIME_DEF := $(S)src/rt/rustrt.def
314315
RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash
315316
RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o)
316317

@@ -322,6 +323,7 @@ LLVMEXT_CS := $(addprefix llvmext/, \
322323
MachOObjectFile.cpp Object.cpp RustWrapper.cpp)
323324

324325
LLVMEXT_HDR := llvmext/include/llvm-c/Object.h
326+
LLVMEXT_DEF := $(S)src/llvmext/rustllvm.def
325327

326328
LLVMEXT_INCS := -iquote $(CFG_LLVM_INCDIR) \
327329
-iquote $(S)src/llvmext/include
@@ -365,14 +367,15 @@ all: boot/rustboot$(X) \
365367
stage0/$(CFG_STDLIB) \
366368
$(GENERATED)
367369

368-
rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR)
370+
rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR) $(RUNTIME_DEF)
369371
@$(call E, link: $@)
370-
$(Q)$(call CFG_LINK_C, $@) $(RUNTIME_OBJS)
372+
$(Q)$(call CFG_LINK_C,$@,$(RUNTIME_OBJS),$(RUNTIME_DEF))
371373

372-
llvmext/$(CFG_LLVMEXT): $(LLVMEXT_OBJS) $(MKFILES) $(LLVMEXT_HDR)
374+
llvmext/$(CFG_LLVMEXT): $(LLVMEXT_OBJS) $(MKFILES) $(LLVMEXT_HDR) \
375+
$(LLVMEXT_DEF)
373376
@$(call E, link: $@)
374-
$(Q)$(call CFG_LINK_C, $@ $(LLVMEXT_OBJS) \
375-
$(CFG_LLVM_LIBS) $(CFG_LLVM_LDFLAGS))
377+
$(Q)$(call CFG_LINK_C,$@,$(CFG_LLVM_LDFLAGS) $(LLVMEXT_OBJS) \
378+
$(CFG_LLVM_LIBS),$(LLVMEXT_DEF))
376379

377380
ifdef CFG_BOOT_NATIVE
378381
boot/rustboot$(X): $(BOOT_CMXS) $(MKFILES)

0 commit comments

Comments
 (0)