Skip to content

Commit 43c66a9

Browse files
authored
Enable LTO for release builds (#1337)
1 parent 8f3a697 commit 43c66a9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ default-members = ["crates/symbolicator", "crates/symbolicli", "crates/symsorter
1616
[profile.release]
1717
# For release builds, we do want line-only debug information to be able to symbolicate panic stack traces.
1818
debug = 1
19+
codegen-units = 1
20+
lto = true
1921

2022
[profile.local]
2123
# For running a local symbolicator, we want the best of both worlds: a fast executable, with quick

crates/symbolicator-service/src/caching/memory.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<T: CacheItemRequest> Cacher<T> {
223223

224224
if let Some(cache_dir) = self.config.cache_dir() {
225225
// Cache is enabled, write it!
226-
let mut cache_path = cache_dir.join(&cache_path);
226+
let cache_path = cache_dir.join(&cache_path);
227227

228228
sentry::configure_scope(|scope| {
229229
scope.set_extra(
@@ -258,6 +258,7 @@ impl<T: CacheItemRequest> Cacher<T> {
258258

259259
#[cfg(debug_assertions)]
260260
{
261+
let mut cache_path = cache_path;
261262
// NOTE: we only create the metadata file once, but do not regularly touch it for now
262263
cache_path.set_extension("txt");
263264
if let Err(err) = std::fs::write(cache_path, key.metadata()) {

0 commit comments

Comments
 (0)