mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 00:06:32 +00:00
refacotr: remove all c files (#1131)
* refacotr: remove all c files Use Rust to implement the symbol table generator. Delete unused header files and c files Adjust the makefile in the debug directory Signed-off-by: Godones <chenlinfeng25@outlook.com> * fix: remove extern "C" rs_* functions move gen_kallsyms.rs to build-scripts Signed-off-by: Godones <chenlinfeng25@outlook.com>
This commit is contained in:
@ -1,8 +1,5 @@
|
||||
use std::{collections::HashSet, path::PathBuf};
|
||||
|
||||
use crate::{constant::ARCH_DIR_RISCV64, utils::FileUtils};
|
||||
|
||||
use super::CFilesArch;
|
||||
use std::{collections::HashSet, path::PathBuf};
|
||||
|
||||
pub(super) struct RiscV64CFilesArch;
|
||||
|
||||
@ -12,18 +9,8 @@ impl CFilesArch for RiscV64CFilesArch {
|
||||
c.define("__riscv", None);
|
||||
}
|
||||
|
||||
fn setup_global_include_dir(&self, include_dirs: &mut HashSet<PathBuf>) {
|
||||
include_dirs.insert("src/arch/riscv64/include".into());
|
||||
}
|
||||
|
||||
fn setup_files(&self, _c: &mut cc::Build, files: &mut HashSet<PathBuf>) {
|
||||
files.insert(PathBuf::from("src/arch/riscv64/asm/head.S"));
|
||||
|
||||
FileUtils::list_all_files(&arch_path("asm"), Some("c"), true)
|
||||
.into_iter()
|
||||
.for_each(|f| {
|
||||
files.insert(f);
|
||||
});
|
||||
}
|
||||
|
||||
fn setup_global_flags(&self, c: &mut cc::Build) {
|
||||
@ -37,7 +24,3 @@ impl CFilesArch for RiscV64CFilesArch {
|
||||
c.flag("-march=rv64gc");
|
||||
}
|
||||
}
|
||||
|
||||
fn arch_path(relative_path: &str) -> PathBuf {
|
||||
PathBuf::from(format!("{}/{}", ARCH_DIR_RISCV64, relative_path))
|
||||
}
|
||||
|
Reference in New Issue
Block a user