From 0211cf3a9ccbbaf1f38c5299d89c992739b17c1e Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Mon, 7 Mar 2022 07:44:11 -0800 Subject: [PATCH] Disable LTO for profile.dev when building CAmkES components. This is a workaround for gdb complaints of the form: Dwarf Error: Cannot find DIE at 0x5136b referenced from DIE at 0x57eed Release builds continue to enable LTO. BUG: 223253186 Change-Id: I137456045e842b2b93b32e0edd348ff916925c97 GitOrigin-RevId: 8ab2ab4fac615eb2a1a259a5a18aa410a4aae5fb --- apps/system/components/DebugConsole/Cargo.toml | 3 ++- apps/system/components/MlCoordinator/Cargo.toml | 3 ++- apps/system/components/ProcessManager/Cargo.toml | 3 ++- apps/system/components/SecurityCoordinator/Cargo.toml | 3 ++- apps/system/components/StorageManager/Cargo.toml | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/system/components/DebugConsole/Cargo.toml b/apps/system/components/DebugConsole/Cargo.toml index 9752d0f..c8f76da 100644 --- a/apps/system/components/DebugConsole/Cargo.toml +++ b/apps/system/components/DebugConsole/Cargo.toml @@ -14,7 +14,8 @@ resolver = "2" [profile.dev] opt-level = 0 debug = true -lto = "fat" +# TODO(b/223253186): workaround gdb DIE errors +lto = false codegen-units = 1 [profile.release] diff --git a/apps/system/components/MlCoordinator/Cargo.toml b/apps/system/components/MlCoordinator/Cargo.toml index 888b05c..d75d49a 100644 --- a/apps/system/components/MlCoordinator/Cargo.toml +++ b/apps/system/components/MlCoordinator/Cargo.toml @@ -10,7 +10,8 @@ resolver = "2" [profile.dev] opt-level = 0 debug = true -lto = "fat" +# TODO(b/223253186): workaround gdb DIE errors +lto = false codegen-units = 1 [profile.release] diff --git a/apps/system/components/ProcessManager/Cargo.toml b/apps/system/components/ProcessManager/Cargo.toml index da48d85..cd1ac00 100644 --- a/apps/system/components/ProcessManager/Cargo.toml +++ b/apps/system/components/ProcessManager/Cargo.toml @@ -11,7 +11,8 @@ resolver = "2" [profile.dev] opt-level = 0 debug = true -lto = "fat" +# TODO(b/223253186): workaround gdb DIE errors +lto = false codegen-units = 1 [profile.release] diff --git a/apps/system/components/SecurityCoordinator/Cargo.toml b/apps/system/components/SecurityCoordinator/Cargo.toml index 8911ac7..98f9bac 100644 --- a/apps/system/components/SecurityCoordinator/Cargo.toml +++ b/apps/system/components/SecurityCoordinator/Cargo.toml @@ -10,7 +10,8 @@ resolver = "2" [profile.dev] opt-level = 0 debug = true -lto = "fat" +# TODO(b/223253186): workaround gdb DIE errors +lto = false codegen-units = 1 [profile.release] diff --git a/apps/system/components/StorageManager/Cargo.toml b/apps/system/components/StorageManager/Cargo.toml index 095342a..0b66971 100644 --- a/apps/system/components/StorageManager/Cargo.toml +++ b/apps/system/components/StorageManager/Cargo.toml @@ -10,7 +10,8 @@ resolver = "2" [profile.dev] opt-level = 0 debug = true -lto = "fat" +# TODO(b/223253186): workaround gdb DIE errors +lto = false codegen-units = 1 [profile.release]