Skip to content

Commit

Permalink
rust: target: factor out and disable emit-debug-gdb-scripts
Browse files Browse the repository at this point in the history
This option was added in `rustc` in order to disable GDB
scripts for some no-`std` targets, see
rust-lang/rust#44993.

Therefore, even though the default in the compiler for targets
is `true`, we leave it as `false`.

If, in the future, it gets enabled, then we should take into
account the `CONFIG_GDB_SCRIPTS` option.

Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Mar 13, 2022
1 parent bcb5e05 commit 0929487
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/generate_rust_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ fn main() {
"e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
);
ts.push("disable-redzone", true);
ts.push("emit-debug-gdb-scripts", false);
ts.push("features", "+strict-align,+neon,+fp-armv8");
ts.push("frame-pointer", "always");
ts.push("llvm-target", "aarch64-unknown-none");
Expand Down Expand Up @@ -254,7 +253,6 @@ fn main() {
}
ts.push("code-model", "medium");
ts.push("disable-redzone", true);
ts.push("emit-debug-gdb-scripts", false);
let mut features = "+m,+a".to_string();
if cfg.has("RISCV_ISA_C") {
features += ",+c";
Expand All @@ -274,7 +272,6 @@ fn main() {
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
);
ts.push("disable-redzone", true);
ts.push("emit-debug-gdb-scripts", false);
ts.push(
"features",
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
Expand All @@ -292,6 +289,7 @@ fn main() {
panic!("Unsupported architecture");
}

ts.push("emit-debug-gdb-scripts", false);
ts.push("env", "gnu");
ts.push("function-sections", false);
ts.push("linker-is-gnu", true);
Expand Down

0 comments on commit 0929487

Please sign in to comment.