Skip to content

Commit 98b00c2

Browse files
committed
Fix compilation
1 parent 7f0b5e4 commit 98b00c2

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/abi.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::ty::Ty;
99
use rustc_middle::ty::layout::LayoutOf;
1010
#[cfg(feature = "master")]
1111
use rustc_session::config;
12-
use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode};
12+
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode};
1313
#[cfg(feature = "master")]
1414
use rustc_target::callconv::Conv;
1515

@@ -239,7 +239,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
239239
}
240240

241241
#[cfg(feature = "master")]
242-
pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute<'gcc>> {
242+
pub fn conv_to_fn_attribute<'gcc>(conv: Conv, arch: &str) -> Option<FnAttribute<'gcc>> {
243243
// TODO: handle the calling conventions returning None.
244244
let attribute = match conv {
245245
Conv::C
@@ -250,20 +250,19 @@ pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute
250250
Conv::Cold => return None,
251251
Conv::PreserveMost => return None,
252252
Conv::PreserveAll => return None,
253-
/*Conv::GpuKernel => {
253+
Conv::GpuKernel => {
254254
if arch == "amdgpu" {
255255
return None
256256
} else if arch == "nvptx64" {
257257
return None
258258
} else {
259-
panic!("Architecture {arch} does not support GpuKernel calling convention");
259+
panic!("Architecture {} does not support GpuKernel calling convention", arch);
260260
}
261-
}*/
261+
}
262262
Conv::AvrInterrupt => return None,
263263
Conv::AvrNonBlockingInterrupt => return None,
264264
Conv::ArmAapcs => return None,
265265
Conv::Msp430Intr => return None,
266-
Conv::PtxKernel => return None,
267266
Conv::X86Fastcall => return None,
268267
Conv::X86Intr => return None,
269268
Conv::X86Stdcall => return None,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {
476476
Some(level) => match level {
477477
OptLevel::No => OptimizationLevel::None,
478478
OptLevel::Less => OptimizationLevel::Limited,
479-
OptLevel::More => OptimizationLevel::Standard,
479+
OptLevel::Default => OptimizationLevel::Standard,
480480
OptLevel::Aggressive => OptimizationLevel::Aggressive,
481481
OptLevel::Size | OptLevel::SizeMin => OptimizationLevel::Limited,
482482
},

0 commit comments

Comments
 (0)