Gone with x86_64-custom

This commit is contained in:
Zhang Junyang
2024-02-27 20:28:43 +08:00
committed by Tate, Hongliang Tian
parent e3c227ae06
commit 7eac2772d0
18 changed files with 64 additions and 147 deletions

View File

@ -1,8 +1,6 @@
// SPDX-License-Identifier: MPL-2.0
use std::{fs, path::PathBuf, process::Command};
use crate::util::get_target_directory;
use std::process::Command;
pub const COMMON_CARGO_ARGS: &[&str] = &[
"-Zbuild-std=core,alloc,compiler_builtins",
@ -14,18 +12,3 @@ pub const DEFAULT_TARGET_RELPATH: &str = "osdk";
pub fn cargo() -> Command {
Command::new("cargo")
}
pub fn create_target_json() -> PathBuf {
let target_osdk_dir = get_target_directory().join(DEFAULT_TARGET_RELPATH);
fs::create_dir_all(&target_osdk_dir).unwrap();
let target_json_path = target_osdk_dir.join("x86_64-custom.json");
if target_json_path.is_file() {
return target_json_path;
}
let contents = include_str!("../base_crate/x86_64-custom.json.template");
fs::write(&target_json_path, contents).unwrap();
target_json_path
}