This commit adds the necessary definitions for target specs and such as well as
the necessary support in libstd to compile basic `aarch64-pc-windows-msvc`
binaries. The target is not currently built on CI, but it can be built locally
with:
./configure --target=aarch64-pc-windows-msvc --set rust.lld
./x.py build src/libstd --target aarch64-pc-windows-msvc
Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?)
which hasn't been investigate yet. Otherwise though with libstd you can build a
hello world program (linked with LLD). I've not tried to execute it yet, but it
at least links!
Full support for this target is still a long road ahead, but this is hopefully a
good stepping stone to get started.
Points of note about this target are:
* Currently defaults to `panic=abort` as support is still landing in LLVM for
SEH on AArch64.
* Currently defaults to LLD as a linker as I was able to get farther with it
than I was with `link.exe`
29 lines
844 B
Rust
29 lines
844 B
Rust
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
|
// file at the top-level directory of this distribution and at
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
// option. This file may not be copied, modified, or distributed
|
|
// except according to those terms.
|
|
|
|
//! Unwinding for wasm32
|
|
//!
|
|
//! Right now we don't support this, so this is just stubs
|
|
|
|
use alloc::boxed::Box;
|
|
use core::any::Any;
|
|
use core::intrinsics;
|
|
|
|
pub fn payload() -> *mut u8 {
|
|
0 as *mut u8
|
|
}
|
|
|
|
pub unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
|
|
intrinsics::abort()
|
|
}
|
|
|
|
pub unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
|
|
intrinsics::abort()
|
|
}
|