mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 02:46:47 +00:00
删除rust_helloworld文件 (#113)
This commit is contained in:
parent
6efd474033
commit
83a7aaa46b
2
Makefile
2
Makefile
@ -21,8 +21,6 @@ endif
|
|||||||
export ARCH=__x86_64__
|
export ARCH=__x86_64__
|
||||||
export ROOT_PATH=$(shell pwd)
|
export ROOT_PATH=$(shell pwd)
|
||||||
|
|
||||||
export RUSTC=$(shell which rustc)
|
|
||||||
|
|
||||||
export DEBUG=DEBUG
|
export DEBUG=DEBUG
|
||||||
export GLOBAL_CFLAGS := -mcmodel=large -fno-builtin -m64 -fno-stack-protector -D $(ARCH) -D $(EMULATOR) -O1
|
export GLOBAL_CFLAGS := -mcmodel=large -fno-builtin -m64 -fno-stack-protector -D $(ARCH) -D $(EMULATOR) -O1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
CFLAGS += -I .
|
CFLAGS += -I .
|
||||||
|
|
||||||
kernel_lib_subdirs:= libUI sys libELF rust_helloworld
|
kernel_lib_subdirs:= libUI sys libELF
|
||||||
|
|
||||||
kernel_lib_objs:= $(shell find ./*.c)
|
kernel_lib_objs:= $(shell find ./*.c)
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
rust_helloworld_objs:=
|
|
||||||
|
|
||||||
ifneq ("$(RUSTC)", "")
|
|
||||||
rust_helloworld_objs += helloworld.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(rust_helloworld_objs)
|
|
||||||
|
|
||||||
helloworld.o: helloworld.rs
|
|
||||||
@echo Compile helloworld.o
|
|
||||||
@echo rustc=$(which rustc)
|
|
||||||
$(shell $(RUSTC) --crate-type staticlib --target x86_64-unknown-none -o helloworld.o helloworld.rs)
|
|
@ -1,17 +0,0 @@
|
|||||||
#![no_std]
|
|
||||||
#![no_main]
|
|
||||||
|
|
||||||
use core::panic::PanicInfo;
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub extern "C" fn rust_helloworld_a_plus_b(a: i32, b: i32) -> i32 {
|
|
||||||
return a+b;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 这个函数将在panic时被调用
|
|
||||||
#[panic_handler]
|
|
||||||
fn panic(_info: &PanicInfo) -> ! {
|
|
||||||
loop {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// rustc --crate-type staticlib --target x86_64-unknown-none -o helloworld.o helloworld.rs
|
|
Loading…
x
Reference in New Issue
Block a user