mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +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() {
|
fn main() {
|
||||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||||
let target = env::var("TARGET").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 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"
|
// 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
|
// config setting. This will enable software to do tasks such as
|
||||||
// managing memory.
|
// managing memory.
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let target = env::var("TARGET").unwrap();
|
let target_os = env::var("CARGO_CFG_TARGET_OS").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"
|
// 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
|
// config setting. This will enable software to do tasks such as
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let target = env::var("TARGET").unwrap();
|
let target_os = env::var("CARGO_CFG_TARGET_OS").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"
|
// 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
|
// 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
|
// NOTE: Adapted from cortex-m/build.rs
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
@ -6,10 +7,9 @@ use std::path::PathBuf;
|
||||||
fn main() {
|
fn main() {
|
||||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||||
let target = env::var("TARGET").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 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"
|
// 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
|
// config setting. This will enable software to do tasks such as
|
||||||
// managing memory.
|
// managing memory.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue