From c65ffa789d57004db42f6c30405c59e0a5bae330 Mon Sep 17 00:00:00 2001 From: Vadim Kaushan Date: Mon, 1 Jul 2019 23:52:40 +0300 Subject: [PATCH] Use code model 'medium' for 64-bit RISC-V targets --- src/librustc_target/spec/riscv64gc_unknown_none_elf.rs | 1 + src/librustc_target/spec/riscv64imac_unknown_none_elf.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs b/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs index a5c13fa28e2ce..8ef197461d92f 100644 --- a/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs @@ -23,6 +23,7 @@ pub fn target() -> TargetResult { executables: true, panic_strategy: PanicStrategy::Abort, relocation_model: "static".to_string(), + code_model: Some("medium".to_string()), emit_debug_gdb_scripts: false, abi_blacklist: super::riscv_base::abi_blacklist(), eliminate_frame_pointer: false, diff --git a/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs b/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs index 237d615ffcc4b..e8a91f0ef9db0 100644 --- a/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs @@ -23,6 +23,7 @@ pub fn target() -> TargetResult { executables: true, panic_strategy: PanicStrategy::Abort, relocation_model: "static".to_string(), + code_model: Some("medium".to_string()), emit_debug_gdb_scripts: false, abi_blacklist: super::riscv_base::abi_blacklist(), eliminate_frame_pointer: false,