From 5ce09bcfa26634cb9a149bbc6363b39d96363bcb Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 18 Nov 2019 07:41:10 -0800 Subject: [PATCH] Disable gdb pretty printer global section on wasm targets The wasm targets don't support gdb anyway so there's no need for this section there. --- src/librustc_target/spec/wasm32_base.rs | 3 +++ src/test/codegen/gdb_debug_script_load.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/librustc_target/spec/wasm32_base.rs b/src/librustc_target/spec/wasm32_base.rs index 6f00245b00941..e18a9e66468c7 100644 --- a/src/librustc_target/spec/wasm32_base.rs +++ b/src/librustc_target/spec/wasm32_base.rs @@ -140,6 +140,9 @@ pub fn options() -> TargetOptions { has_elf_tls: true, tls_model: "local-exec".to_string(), + // gdb scripts don't work on wasm blobs + emit_debug_gdb_scripts: false, + .. Default::default() } } diff --git a/src/test/codegen/gdb_debug_script_load.rs b/src/test/codegen/gdb_debug_script_load.rs index 2e8dc7b6f36cb..178269f611e61 100644 --- a/src/test/codegen/gdb_debug_script_load.rs +++ b/src/test/codegen/gdb_debug_script_load.rs @@ -1,6 +1,8 @@ // ignore-tidy-linelength // ignore-windows // ignore-macos +// ignore-wasm +// ignore-emscripten // compile-flags: -g -C no-prepopulate-passes