Skip to content

Commit d9fe664

Browse files
committed
Update avr layout
1 parent c5f8973 commit d9fe664

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ pub(crate) unsafe fn create_module<'ll>(
215215
}
216216
if llvm_version < (22, 0, 0) {
217217
if sess.target.arch == "avr" {
218-
// LLVM 22.0 updated the default layout on avr: https://github.com/llvm/llvm-project/pull/152028
219-
target_data_layout = target_data_layout.replace("n8-n16:8", "n8")
218+
// LLVM 22.0 updated the default layout on avr: https://github.com/llvm/llvm-project/pull/153010
219+
target_data_layout = target_data_layout.replace("n8:16", "n8")
220220
}
221221
}
222222

compiler/rustc_target/src/spec/targets/avr_none.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub(crate) fn target() -> Target {
99
host_tools: None,
1010
std: None,
1111
},
12-
data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-n16:8-a:8".into(),
12+
data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8:16-a:8".into(),
1313
llvm_target: "avr-unknown-unknown".into(),
1414
pointer_width: 16,
1515
options: TargetOptions {

0 commit comments

Comments
 (0)