diff --git a/mk/rt.mk b/mk/rt.mk index 4f9c587c1f2..11e110666ab 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -33,7 +33,7 @@ RUNTIME_CS := rt/sync/timer.cpp \ RUNTIME_LL := -RUNTIME_S := rt/arch/i386/_context.s +RUNTIME_S := rt/arch/i386/_context.S RUNTIME_HDR := rt/globals.h \ rt/rust.h \ @@ -67,14 +67,14 @@ RUNTIME_HDR := rt/globals.h \ RUNTIME_DEF := rt/rustrt$(CFG_DEF_SUFFIX) RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash \ -I $(S)src/rt/arch/i386 -I $(S)src/rt/libuv/include -RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.s=.o) +RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.S=.o) RUNTIME_LIBS := rt/libuv/uv.a rt/%.o: rt/%.cpp $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(RUNTIME_INCS)) $< -rt/%.o: rt/%.s $(MKFILES) +rt/%.o: rt/%.S $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(RUNTIME_INCS)) $< diff --git a/src/rt/arch/i386/_context.s b/src/rt/arch/i386/_context.S similarity index 96% rename from src/rt/arch/i386/_context.s rename to src/rt/arch/i386/_context.S index d4c3fc436c6..5bd06d990dc 100644 --- a/src/rt/arch/i386/_context.s +++ b/src/rt/arch/i386/_context.S @@ -78,4 +78,8 @@ swap_registers: .globl task_trampoline task_trampoline: // This gets set up by std::task::_spawn. +#ifdef __APPLE__ call _task_exit +#else + call task_exit +#endif