diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2018-01-03 10:29:27 +0100 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2018-05-01 10:44:44 +0300 |
| commit | 5b800c231f45fcd823a3e958bb942cd620ceb3e0 (patch) | |
| tree | 97d7f7c2ebbdef87bb5ef45b96a43a1e6e304144 /src/test/codegen | |
| parent | 2a8ad909304953973a819760071de99f2ce5fb2d (diff) | |
| download | rust-5b800c231f45fcd823a3e958bb942cd620ceb3e0.tar.gz rust-5b800c231f45fcd823a3e958bb942cd620ceb3e0.zip | |
Don't force-enable frame pointers when generating debug info
We apparently used to generate bad/incomplete debug info causing debuggers not to find symbols of stack allocated variables. This was somehow worked around by having frame pointers. With the current codegen, this seems no longer necessary, so we can remove the code that force-enables frame pointers whenever debug info is requested. Since certain situations, like profiling code profit from having frame pointers, we add a -Cforce-frame-pointers flag to always enable frame pointers. Fixes #11906
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/force-frame-pointers.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/codegen/force-frame-pointers.rs b/src/test/codegen/force-frame-pointers.rs new file mode 100644 index 00000000000..d40406a0476 --- /dev/null +++ b/src/test/codegen/force-frame-pointers.rs @@ -0,0 +1,16 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. +// +// compile-flags: -C no-prepopulate-passes -C force-frame-pointers + +#![crate_type="lib"] + +// CHECK: attributes #{{.*}} "no-frame-pointer-elim"="true" +pub fn foo() {} |
