File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change 1
- [target .riscv64imac-unknown-none-elf ]
2
- rustflags = [
3
- " -C" , " link-arg=-Tlinker64.ld" ,
4
- ]
5
-
6
- [target .riscv32imac-unknown-none-elf ]
7
- rustflags = [
8
- " -C" , " link-arg=-Tlinker32.ld" ,
9
- ]
1
+ [build ]
2
+ target = " riscv64imac-unknown-none-elf"
Original file line number Diff line number Diff line change 1
- use std:: env;
2
- use std:: fs;
3
- use std:: io:: Write ;
4
- use std:: path:: PathBuf ;
5
-
6
1
fn main ( ) {
7
2
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
8
- println ! ( "cargo:rerun-if-changed=src/linker64.ld" ) ;
9
-
10
- let out_dir = PathBuf :: from ( env:: var ( "OUT_DIR" ) . unwrap ( ) ) ;
11
-
12
- fs:: File :: create ( out_dir. join ( "linker64.ld" ) )
13
- . unwrap ( )
14
- . write_all ( include_bytes ! ( "src/linker64.ld" ) )
15
- . unwrap ( ) ;
16
- println ! ( "cargo:rustc-link-search={}" , out_dir. display( ) ) ;
3
+ println ! ( "cargo:rustc-link-arg=-Trustsbi-qemu/src/linker64.ld" ) ;
17
4
}
You can’t perform that action at this time.
0 commit comments