Provide memory intrinsics via compiler builtins
Use unstable feature to remove rlibc crate dependency.
This commit is contained in:
		
							parent
							
								
									bfba78118f
								
							
						
					
					
						commit
						dc2a73f6c6
					
				| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
[unstable]
 | 
					[unstable]
 | 
				
			||||||
build-std = ["core", "compiler_builtins", "alloc"]
 | 
					build-std = ["core", "compiler_builtins", "alloc"]
 | 
				
			||||||
 | 
					build-std-features = ["compiler-builtins-mem"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[build]
 | 
					[build]
 | 
				
			||||||
# https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199/12
 | 
					# https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199/12
 | 
				
			||||||
pipelining = true
 | 
					pipelining = true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,12 +72,6 @@ dependencies = [
 | 
				
			||||||
 "tock-registers",
 | 
					 "tock-registers",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					 | 
				
			||||||
name = "rlibc"
 | 
					 | 
				
			||||||
version = "1.0.0"
 | 
					 | 
				
			||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					 | 
				
			||||||
checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "snafu"
 | 
					name = "snafu"
 | 
				
			||||||
version = "0.6.9"
 | 
					version = "0.6.9"
 | 
				
			||||||
| 
						 | 
					@ -145,7 +139,6 @@ dependencies = [
 | 
				
			||||||
 "qemu-exit",
 | 
					 "qemu-exit",
 | 
				
			||||||
 "r0",
 | 
					 "r0",
 | 
				
			||||||
 "register",
 | 
					 "register",
 | 
				
			||||||
 "rlibc",
 | 
					 | 
				
			||||||
 "snafu",
 | 
					 "snafu",
 | 
				
			||||||
 "usize_conversions",
 | 
					 "usize_conversions",
 | 
				
			||||||
 "ux",
 | 
					 "ux",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ Vesper has been influenced by the kernels in L4 family, notably seL4. Fawn and N
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Build instructions
 | 
					## Build instructions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Use at least rustc nightly 2020-07-15 with cargo nightly of the same or later date. It adds support for `cargo build --build-std` feature.
 | 
					Use at least rustc nightly 2020-09-30 with cargo nightly of the same or later date. It adds support for `cargo build --build-std` feature (since 2020-07-15) and support for compiler_builtins memory operations ([since 2020-09-30](https://github.com/rust-lang/rust/pull/77284)).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Install tools: `cargo install just cargo-make`.
 | 
					* Install tools: `cargo install just cargo-make`.
 | 
				
			||||||
* Install qemu (at least version 4.1.1): `brew install qemu`.
 | 
					* Install qemu (at least version 4.1.1): `brew install qemu`.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,6 @@ qemu = ["qemu-exit"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies]
 | 
					[dependencies]
 | 
				
			||||||
r0 = "1.0"
 | 
					r0 = "1.0"
 | 
				
			||||||
rlibc = "1.0"
 | 
					 | 
				
			||||||
qemu-exit = { version = "1.0", optional = true }
 | 
					qemu-exit = { version = "1.0", optional = true }
 | 
				
			||||||
cortex-a = "4.0"
 | 
					cortex-a = "4.0"
 | 
				
			||||||
ux = { version = "0.1.3", default-features = false }
 | 
					ux = { version = "0.1.3", default-features = false }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,8 +25,6 @@
 | 
				
			||||||
#[cfg(not(target_arch = "aarch64"))]
 | 
					#[cfg(not(target_arch = "aarch64"))]
 | 
				
			||||||
use architecture_not_supported_sorry;
 | 
					use architecture_not_supported_sorry;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern crate rlibc; // To enable linking memory intrinsics.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// Architecture-specific code.
 | 
					/// Architecture-specific code.
 | 
				
			||||||
#[macro_use]
 | 
					#[macro_use]
 | 
				
			||||||
pub mod arch;
 | 
					pub mod arch;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue