mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-18 18:08:07 +03:00
Keep symbol names in bundled linux binaries (#13006)
This ensures that linux panics still contain symbol names. It also allows us to profile Zed on linux with `perf` and get symbol names. Release Notes: - N/A
This commit is contained in:
parent
ce51c264a6
commit
af8e7af265
@ -73,6 +73,7 @@ actions!(
|
|||||||
ShowAll,
|
ShowAll,
|
||||||
ToggleFullScreen,
|
ToggleFullScreen,
|
||||||
Zoom,
|
Zoom,
|
||||||
|
TestPanic,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -84,6 +85,10 @@ pub fn init(cx: &mut AppContext) {
|
|||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
cx.on_action(|_: &ShowAll, cx| cx.unhide_other_apps());
|
cx.on_action(|_: &ShowAll, cx| cx.unhide_other_apps());
|
||||||
cx.on_action(quit);
|
cx.on_action(quit);
|
||||||
|
|
||||||
|
if ReleaseChannel::global(cx) == ReleaseChannel::Dev {
|
||||||
|
cx.on_action(test_panic);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_window_options(display_uuid: Option<Uuid>, cx: &mut AppContext) -> WindowOptions {
|
pub fn build_window_options(display_uuid: Option<Uuid>, cx: &mut AppContext) -> WindowOptions {
|
||||||
@ -484,6 +489,10 @@ fn about(_: &mut Workspace, _: &About, cx: &mut gpui::ViewContext<Workspace>) {
|
|||||||
.detach();
|
.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn test_panic(_: &TestPanic, _: &mut AppContext) {
|
||||||
|
panic!("Ran the TestPanic action")
|
||||||
|
}
|
||||||
|
|
||||||
fn quit(_: &Quit, cx: &mut AppContext) {
|
fn quit(_: &Quit, cx: &mut AppContext) {
|
||||||
let should_confirm = WorkspaceSettings::get_global(cx).confirm_quit;
|
let should_confirm = WorkspaceSettings::get_global(cx).confirm_quit;
|
||||||
cx.spawn(|mut cx| async move {
|
cx.spawn(|mut cx| async move {
|
||||||
|
@ -43,8 +43,8 @@ cargo build --release --target "${target_triple}" --package zed --package cli
|
|||||||
|
|
||||||
# Strip the binary of all debug symbols
|
# Strip the binary of all debug symbols
|
||||||
# Later, we probably want to do something like this: https://github.com/GabrielMajeri/separate-symbols
|
# Later, we probably want to do something like this: https://github.com/GabrielMajeri/separate-symbols
|
||||||
strip "target/${target_triple}/release/zed"
|
strip --strip-debug "target/${target_triple}/release/zed"
|
||||||
strip "target/${target_triple}/release/cli"
|
strip --strip-debug "target/${target_triple}/release/cli"
|
||||||
|
|
||||||
suffix=""
|
suffix=""
|
||||||
if [ "$channel" != "stable" ]; then
|
if [ "$channel" != "stable" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user