Skip to content

Commit 251e52e

Browse files
committed
Fix rt deps. Close #1449.
1 parent d28175b commit 251e52e

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

mk/rt.mk

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -66,40 +66,16 @@ RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.S \
6666
rt/arch/$$(HOST_$(1))/ccall.S \
6767
rt/arch/$$(HOST_$(1))/record_sp.S
6868

69-
RUNTIME_HDR_$(1) := rt/globals.h \
70-
rt/rust.h \
71-
rt/rust_abi.h \
72-
rt/rust_cc.h \
73-
rt/rust_debug.h \
74-
rt/rust_internal.h \
75-
rt/rust_util.h \
76-
rt/rust_env.h \
77-
rt/rust_unwind.h \
78-
rt/rust_upcall.h \
79-
rt/rust_port.h \
80-
rt/rust_task_thread.h \
81-
rt/rust_scheduler.h \
82-
rt/rust_shape.h \
83-
rt/rust_task.h \
84-
rt/rust_stack.h \
85-
rt/rust_log.h \
86-
rt/rust_port_selector.h \
87-
rt/circular_buffer.h \
88-
rt/util/array_list.h \
89-
rt/util/indexed_list.h \
90-
rt/util/synchronized_indexed_list.h \
91-
rt/util/hash_map.h \
92-
rt/sync/sync.h \
93-
rt/sync/timer.h \
94-
rt/sync/lock_and_signal.h \
95-
rt/sync/lock_free_queue.h \
96-
rt/sync/rust_thread.h \
97-
rt/rust_srv.h \
98-
rt/rust_kernel.h \
99-
rt/memory_region.h \
100-
rt/memory.h \
101-
rt/arch/$$(HOST_$(1))/context.h \
102-
rt/arch/$$(HOST_$(1))/regs.h
69+
RUNTIME_HDR_$(1) := $$(wildcard \
70+
rt/*.h \
71+
rt/bigint/*.h \
72+
rt/isaac/*.h \
73+
rt/msvc/*.h \
74+
rt/sync/*.h \
75+
rt/uthash/*.h \
76+
rt/util/*.h \
77+
rt/vg/*.h \
78+
rt/arch/$$(HOST_$(1))/*.h)
10379

10480
ifeq ($$(HOST_$(1)), i386)
10581
LIBUV_ARCH_$(1) := ia32
@@ -129,11 +105,12 @@ RUNTIME_OBJS_$(1) := $$(RUNTIME_CS_$(1):rt/%.cpp=rt/$(1)/%.o) \
129105
$$(RUNTIME_S_$(1):rt/%.S=rt/$(1)/%.o)
130106
RUNTIME_LIBS_$(1) := $$(LIBUV_LIB_$(1))
131107

132-
rt/$(1)/%.o: rt/%.cpp $$(MKFILE_DEPS)
108+
rt/$(1)/%.o: rt/%.cpp RUNTIME_HDR_$(1) $$(MKFILE_DEPS)
133109
@$$(call E, compile: $$@)
134110
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1))) $$<
135111

136-
rt/$(1)/%.o: rt/%.S $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_HOST_TRIPLE))
112+
rt/$(1)/%.o: rt/%.S RUNTIME_HDR_$(1) $$(MKFILE_DEPS) \
113+
$$(LLVM_CONFIG_$$(CFG_HOST_TRIPLE))
137114
@$$(call E, compile: $$@)
138115
$$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<)
139116

@@ -143,7 +120,7 @@ rt/$(1)/arch/$$(HOST_$(1))/libmorestack.a: \
143120
$$(Q)ar rcs $$@ $$<
144121

145122
rt/$(1)/$(CFG_RUNTIME): $$(RUNTIME_OBJS_$(1)) $$(MKFILE_DEPS) \
146-
$$(RUNTIME_HDR_$(1)) \
123+
$$(RUNTIME_HDR_$(1)) \
147124
$$(RUNTIME_DEF_$(1)) \
148125
$$(RUNTIME_LIBS_$(1))
149126
@$$(call E, link: $$@)

0 commit comments

Comments
 (0)