Skip to content

Commit 2c0f9bd

Browse files
committed
auto merge of #8695 : thestinger/rust/build, r=pcwalton
We currently have no need for the frame pointers on any platform. They may eventually be needed on platforms without an equivalent to the DWARF call frame information to walk the stack in the garbage collector. Closes #7477
2 parents f8c4f0e + 0ac02e7 commit 2c0f9bd

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

mk/llvm.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ifeq ($(CFG_LLVM_ROOT),)
2626

2727
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
2828
@$$(call E, make: llvm)
29-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
29+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1))
3030
$$(Q)touch $$(LLVM_CONFIG_$(1))
3131
endif
3232

mk/platform.mk

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ endef
2626
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_OSTYPE_VAR,$(t))))
2727
$(foreach t,$(CFG_TARGET_TRIPLES),$(info cfg: os for $(t) is $(OSTYPE_$(t))))
2828

29-
# FIXME: no-omit-frame-pointer is just so that task_start_wrapper
30-
# has a frame pointer and the stack walker can understand it. Turning off
31-
# frame pointers everywhere is overkill
32-
CFG_GCCISH_CFLAGS += -fno-omit-frame-pointer -DUSE_UTF8
29+
CFG_GCCISH_CFLAGS += -DUSE_UTF8
3330

3431
# On Darwin, we need to run dsymutil so the debugging information ends
3532
# up in the right place. On other platforms, it automatically gets
@@ -153,7 +150,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive
153150
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
154151
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
155152
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
156-
CFG_LLVM_BUILD_ENV_x86_64-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
157153
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
158154
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
159155
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
@@ -179,7 +175,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-linux-gnu := -Wl,-no-whole-archive
179175
CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
180176
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
181177
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
182-
CFG_LLVM_BUILD_ENV_i686-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
183178
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
184179
CFG_WINDOWSY_i686-unknown-linux-gnu :=
185180
CFG_UNIXY_i686-unknown-linux-gnu := 1

src/rustllvm/RustWrapper.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ LLVMRustBuildJIT(void* mem,
342342
std::string Err;
343343
TargetOptions Options;
344344
Options.JITEmitDebugInfo = true;
345-
Options.NoFramePointerElim = true;
346345
Options.EnableSegmentedStacks = EnableSegmentedStacks;
347346
RustMCJITMemoryManager* MM = (RustMCJITMemoryManager*) mem;
348347
assert(MM);
@@ -393,7 +392,6 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
393392
}
394393

395394
TargetOptions Options;
396-
Options.NoFramePointerElim = true;
397395
Options.EnableSegmentedStacks = EnableSegmentedStacks;
398396
Options.FixedStackSegmentSize = 2 * 1024 * 1024; // XXX: This is too big.
399397

0 commit comments

Comments
 (0)