Skip to content

Instantly share code, notes, and snippets.

@pravic
Last active April 8, 2016 07:09
Show Gist options
  • Save pravic/9d8a5ec285efa187000cb353a9ad3256 to your computer and use it in GitHub Desktop.
Save pravic/9d8a5ec285efa187000cb353a9ad3256 to your computer and use it in GitHub Desktop.
msvc-target.json
#[lang = "sized"]
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
pub trait Sized {
// Empty.
}
pub trait Clone : Sized {
fn clone(&self) -> Self;
#[inline(always)]
fn clone_from(&mut self, source: &Self) {
*self = source.clone()
}
}
#[lang = "copy"]
pub trait Copy : Clone {
// Empty.
}
{
"_": "Inspired by https://github.com/joerg-krause/rust-cross-libs/blob/master/cfg/armv5te-unknown-linux-gnueabi.json",
"llvm-target": "i686-pc-windows-msvc",
"target-endian": "little",
"target-pointer-width": "32",
"target-family": "windows",
"arch": "x86",
"vendor": "pc",
"os": "windows",
"cpu": "pentium4",
"linker": "link.exe", "comment": "when specified, rustc passes args as for GNU linker: -L, -shared, -Wl,-Bstatic, etc.",
"ar": "lib.exe",
"executables": true,
"dynamic-linking": true,
"is-like-windows": true,
"is-like-msvc": true,
"is-like-osx": false,
"is-like-android": false,
"linker-is-gnu": false,
"dll-prefix": "",
"dll-suffix": ".sys",
"exe-prefix": "",
"exe-suffix": ".exe",
"staticlib-prefix": "",
"staticlib-suffix": ".lib",
"no-default-libraries": true,
"no-compiler-rt": true,
"has-rpath": true,
"allow-asm": true,
"has-elf-tls": false,
"disable-redzone": true,
"custom-unwind-resume": true,
"eliminate-frame-pointer": false,
"position-independent-executables": false,
"function-sections": true,
"code-model": "kernel",
"relocation-model": "dynamic-no-pic",
"archive-format": "",
"pre-link-objects-exe": [],
"pre-link-objects-dll": [],
"pre-link-args": ["/NOLOGO", "/INCREMENTAL:NO", "/MANIFEST:NO", "/NODEFAULTLIB", "/SUBSYSTEM:NATIVE", "/DRIVER", "/RELEASE", "/FIXED:No", "/NXCOMPAT", "/DYNAMICBASE"],
"late-link-args": [],
"post-link-args": [],
"post-link-objects": ["ntoskrnl.lib", "hal.lib"],
"_end" : false
}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! {loop{}}
#[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
// #[no_mangle] pub extern fn rust_eh_register_frames () {}
// #[no_mangle] pub extern fn rust_eh_unregister_frames () {}
#![feature(lang_items)]
#![feature(on_unimplemented, fundamental)]
#![feature(no_core)]
#![no_core]
#![allow(dead_code)]
mod core;
mod lang;
#[no_mangle]
pub extern "system" fn entry() -> u32 { return 0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment