mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
Merge pull request #239 from Foundation-Devices/baremetal
Use CARGO_CFG_TARGET_OS in build scripts.
This commit is contained in:
commit
51752aac9d
4 changed files with 5 additions and 10 deletions
|
|
@ -10,10 +10,9 @@ use std::path::PathBuf;
|
|||
fn main() {
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
let target = env::var("TARGET").unwrap();
|
||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
let name = env::var("CARGO_PKG_NAME").unwrap();
|
||||
|
||||
let target_os = target.split('-').nth(2).unwrap_or("none");
|
||||
|
||||
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
||||
// config setting. This will enable software to do tasks such as
|
||||
// managing memory.
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let target = env::var("TARGET").unwrap();
|
||||
|
||||
let target_os = target.split('-').nth(2).unwrap_or("none");
|
||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
|
||||
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
||||
// config setting. This will enable software to do tasks such as
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let target = env::var("TARGET").unwrap();
|
||||
|
||||
let target_os = target.split('-').nth(2).unwrap_or("none");
|
||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
|
||||
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
||||
// config setting. This will enable software to do tasks such as
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
use core::panic;
|
||||
// NOTE: Adapted from cortex-m/build.rs
|
||||
use std::env;
|
||||
use std::fs;
|
||||
|
|
@ -6,10 +7,9 @@ use std::path::PathBuf;
|
|||
fn main() {
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
let target = env::var("TARGET").unwrap();
|
||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
let name = env::var("CARGO_PKG_NAME").unwrap();
|
||||
|
||||
let target_os = target.split('-').nth(2).unwrap_or("none");
|
||||
|
||||
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
||||
// config setting. This will enable software to do tasks such as
|
||||
// managing memory.
|
||||
|
|
|
|||
Loading…
Reference in a new issue