This repository was archived by the owner on Mar 7, 2021. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 11obj-m  := helloworld.o
22helloworld-objs  := hello_world.rust.o
33
4+ #  Don't define these if the kernel we're compiling against already has them.
5+ ifndef  CONFIG_RUST 
46CARGO  ?= cargo
57
68$(src ) /target/x86_64-linux-kernel/debug/libhello_world.a$(src ) /Cargo.toml $(wildcard  $(src ) /src/* .rs) 
79	cd  $(src ) ;  env -u MAKE -u MAKEFLAGS $(CARGO )  build -Z build-std=core,alloc --target=x86_64-linux-kernel
810
911% .rust.o% .a
1012	$(LD )  -r -o $@  --whole-archive $< 
13+ endif 
Original file line number Diff line number Diff line change 11obj-m  := testmodule.o
22testmodule-objs  := $(TEST_NAME ) .rust.o
33
4+ #  Don't define these if the kernel we're compiling against already has them.
5+ ifndef  CONFIG_RUST 
46CARGO  ?= cargo
57
68$(src ) /target/x86_64-linux-kernel/debug/lib% .a$(src ) /$(TEST_PATH ) /Cargo.toml $(wildcard  $(src ) /$(TEST_PATH ) /src/* .rs) 
79	cd  $(src ) /$(TEST_PATH ) ;  env -u MAKE -u MAKEFLAGS CARGO_TARGET_DIR=../target $(CARGO )  build -Z build-std=core,alloc --target=x86_64-linux-kernel
810
911% .rust.o% .a
1012	$(LD )  -r -o $@  --whole-archive $< 
13+ endif 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments