Skip to content

Commit abdd231

Browse files
committed
---
yaml --- r: 12133 b: refs/heads/master c: bd03998 h: refs/heads/master i: 12131: f80a7c5 v: v3
1 parent ce1ec64 commit abdd231

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 45a709766c60869ebdcad776ef9c9804aee7f506
2+
refs/heads/master: bd0399863fd2e012c46d0fed50e016f5dd147d82
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/mk/rt.mk

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
LIBUV_FLAGS_i386 = -m32 -fPIC
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929

30+
# when we're doing a snapshot build, we intentionally degrade as many
31+
# features in libuv and the runtime as possible, to ease portability.
32+
33+
SNAP_DEFINES:=
34+
ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
35+
SNAP_DEFINES=-DRUST_SNAPSHOT
36+
endif
37+
38+
3039
define DEF_RUNTIME_TARGETS
3140

3241
######################################################################
@@ -107,7 +116,8 @@ RUNTIME_LIBS_$(1) := $$(LIBUV_LIB_$(1))
107116

108117
rt/$(1)/%.o: rt/%.cpp $$(RUNTIME_HDR_$(1)) $$(MKFILE_DEPS)
109118
@$$(call E, compile: $$@)
110-
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1))) $$<
119+
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1)) \
120+
$$(SNAP_DEFINES)) $$<
111121

112122
rt/$(1)/%.o: rt/%.S $$(RUNTIME_HDR_$(1)) $$(MKFILE_DEPS) \
113123
$$(LLVM_CONFIG_$$(CFG_HOST_TRIPLE))
@@ -144,7 +154,7 @@ endif
144154

145155
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
146156
$$(Q)$$(MAKE) -C $$(S)mk/libuv/$$(LIBUV_ARCH_$(1))/$$(LIBUV_OSTYPE_$(1)) \
147-
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
157+
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
148158
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
149159
CC="$$(CFG_GCCISH_CROSS)$$(CC)" \
150160
CXX="$$(CFG_GCCISH_CROSS)$$(CXX)" \

trunk/src/libuv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 1170ffba3ac5191930b40c897d4569a9d8a296a3
1+
Subproject commit 1d6aec9d54c7a684ade521f71a4d538a6a88b14f

trunk/src/rt/rust_run_program.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ rust_run_program(const char* argv[],
168168
*_NSGetEnviron() = (char **)envp;
169169
}
170170
execvp(argv[0], (char * const *)argv);
171-
#elif __FreeBSD__
171+
#elif __FreeBSD__ || (defined(__linux__) && defined(RUST_SNAPSHOT))
172172
if (envp) { environ = (char **)envp; }
173173
execvp(argv[0], (char * const *)argv);
174174
#else

0 commit comments

Comments
 (0)