From e8eb5b9b458e6c5a6c98ce7991b49d61190ce08a Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 9 Aug 2018 16:05:33 -0500 Subject: [PATCH] Restore debug info --- Cargo.toml | 2 -- tools/rust-lld-wrapper | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d0d9e5c21..694fe8fe2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,6 @@ path = "src/rust/lib.rs" [profile.dev] lto = false -# XXX: 2 -> removes debug information in later rust verions -# 0 -> requires more imports that are optimised away opt-level = 2 panic = "abort" overflow-checks = false diff --git a/tools/rust-lld-wrapper b/tools/rust-lld-wrapper index 70826f6597..7e6aac3024 100755 --- a/tools/rust-lld-wrapper +++ b/tools/rust-lld-wrapper @@ -11,7 +11,10 @@ def main(): args = sys.argv[1:] # filter out args inserted by rustc - TO_REMOVE = {"--stack-first"} + TO_REMOVE = { + "--stack-first", + "--strip-debug", # TODO: Make this configurable + } args = list(filter(lambda arg: arg not in TO_REMOVE, args)) lld = find_rust_lld()