parent
b6144483ef
commit
daad966be7
3 changed files with 17 additions and 8 deletions
|
@ -12,6 +12,7 @@ fi
|
||||||
|
|
||||||
HOST_TRIPLE=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
HOST_TRIPLE=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
||||||
TARGET_TRIPLE=$HOST_TRIPLE
|
TARGET_TRIPLE=$HOST_TRIPLE
|
||||||
|
#TARGET_TRIPLE="x86_64-pc-windows-gnu"
|
||||||
#TARGET_TRIPLE="aarch64-unknown-linux-gnu"
|
#TARGET_TRIPLE="aarch64-unknown-linux-gnu"
|
||||||
|
|
||||||
linker=''
|
linker=''
|
||||||
|
@ -21,6 +22,9 @@ if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
|
||||||
# We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
|
# We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
|
||||||
linker='-Clinker=aarch64-linux-gnu-gcc'
|
linker='-Clinker=aarch64-linux-gnu-gcc'
|
||||||
RUN_WRAPPER='qemu-aarch64 -L /usr/aarch64-linux-gnu'
|
RUN_WRAPPER='qemu-aarch64 -L /usr/aarch64-linux-gnu'
|
||||||
|
elif [[ "$TARGET_TRIPLE" == "x86_64-pc-windows-gnu" ]]; then
|
||||||
|
# We are cross-compiling for Windows. Run tests in wine.
|
||||||
|
RUN_WRAPPER='wine'
|
||||||
else
|
else
|
||||||
echo "Unknown non-native platform"
|
echo "Unknown non-native platform"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -85,18 +85,12 @@ fn clif_sig_from_fn_sig<'tcx>(
|
||||||
requires_caller_location: bool,
|
requires_caller_location: bool,
|
||||||
) -> Signature {
|
) -> Signature {
|
||||||
let abi = match sig.abi {
|
let abi = match sig.abi {
|
||||||
Abi::System => {
|
Abi::System => Abi::C,
|
||||||
if tcx.sess.target.target.options.is_like_windows {
|
|
||||||
unimplemented!()
|
|
||||||
} else {
|
|
||||||
Abi::C
|
|
||||||
}
|
|
||||||
}
|
|
||||||
abi => abi,
|
abi => abi,
|
||||||
};
|
};
|
||||||
let (call_conv, inputs, output): (CallConv, Vec<Ty<'tcx>>, Ty<'tcx>) = match abi {
|
let (call_conv, inputs, output): (CallConv, Vec<Ty<'tcx>>, Ty<'tcx>) = match abi {
|
||||||
Abi::Rust => (CallConv::triple_default(triple), sig.inputs().to_vec(), sig.output()),
|
Abi::Rust => (CallConv::triple_default(triple), sig.inputs().to_vec(), sig.output()),
|
||||||
Abi::C => (CallConv::triple_default(triple), sig.inputs().to_vec(), sig.output()),
|
Abi::C | Abi::Unadjusted => (CallConv::triple_default(triple), sig.inputs().to_vec(), sig.output()),
|
||||||
Abi::RustCall => {
|
Abi::RustCall => {
|
||||||
assert_eq!(sig.inputs().len(), 2);
|
assert_eq!(sig.inputs().len(), 2);
|
||||||
let extra_args = match sig.inputs().last().unwrap().kind {
|
let extra_args = match sig.inputs().last().unwrap().kind {
|
||||||
|
|
11
src/base.rs
11
src/base.rs
|
@ -679,6 +679,17 @@ fn trans_stmt<'tcx>(
|
||||||
|
|
||||||
crate::trap::trap_unimplemented(fx, "_xgetbv arch intrinsic is not supported");
|
crate::trap::trap_unimplemented(fx, "_xgetbv arch intrinsic is not supported");
|
||||||
}
|
}
|
||||||
|
// ___chkstk, ___chkstk_ms and __alloca are only used on Windows
|
||||||
|
_ if fx.tcx.symbol_name(fx.instance).name.as_str().starts_with("___chkstk") => {
|
||||||
|
crate::trap::trap_unimplemented(fx, "Stack probes are not supported");
|
||||||
|
}
|
||||||
|
_ if fx.tcx.symbol_name(fx.instance).name.as_str() == "__alloca" => {
|
||||||
|
crate::trap::trap_unimplemented(fx, "Alloca is not supported");
|
||||||
|
}
|
||||||
|
// Used in sys::windows::abort_internal
|
||||||
|
"int $$0x29" => {
|
||||||
|
crate::trap::trap_unimplemented(fx, "Windows abort");
|
||||||
|
}
|
||||||
_ => unimpl_fatal!(fx.tcx, stmt.source_info.span, "Inline assembly is not supported"),
|
_ => unimpl_fatal!(fx.tcx, stmt.source_info.span, "Inline assembly is not supported"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue