File tree Expand file tree Collapse file tree 8 files changed +40
-40
lines changed Expand file tree Collapse file tree 8 files changed +40
-40
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub trait Target: Send + Sync {
18
18
19
19
/// Get the additional Cargo features to enable when building
20
20
/// `r3_port_*_test_driver`.
21
- fn cargo_features ( & self ) -> & [ & str ] ;
21
+ fn cargo_features ( & self ) -> Vec < String > ;
22
22
23
23
/// Generate the `memory.x` file to be included by the linker script of
24
24
/// `cortex-m-rt` or `r3_port_arm`, or to be used as the top-level
@@ -62,7 +62,7 @@ impl<T: Target> Target for OverrideTargetArch<T> {
62
62
self . 0
63
63
}
64
64
65
- fn cargo_features ( & self ) -> & [ & str ] {
65
+ fn cargo_features ( & self ) -> Vec < String > {
66
66
self . 1 . cargo_features ( )
67
67
}
68
68
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ impl Target for RedV {
26
26
Arch :: RV32IMAC
27
27
}
28
28
29
- fn cargo_features ( & self ) -> & [ & str ] {
30
- & [
31
- "boot-rt" ,
32
- "output-rtt" ,
33
- "interrupt-e310x" ,
34
- "board-e310x-red-v" ,
35
- "r3_port_riscv/emulate-lr-sc" ,
29
+ fn cargo_features ( & self ) -> Vec < String > {
30
+ vec ! [
31
+ "boot-rt" . to_owned ( ) ,
32
+ "output-rtt" . to_owned ( ) ,
33
+ "interrupt-e310x" . to_owned ( ) ,
34
+ "board-e310x-red-v" . to_owned ( ) ,
35
+ "r3_port_riscv/emulate-lr-sc" . to_owned ( ) ,
36
36
]
37
37
}
38
38
Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ impl Target for Maix {
25
25
Arch :: RV64GC
26
26
}
27
27
28
- fn cargo_features ( & self ) -> & [ & str ] {
29
- & [
30
- "boot-rt" ,
31
- "output-k210-uart" ,
32
- "interrupt-k210" ,
33
- "board-maix" ,
34
- "r3_port_riscv/maintain-pie" ,
28
+ fn cargo_features ( & self ) -> Vec < String > {
29
+ vec ! [
30
+ "boot-rt" . to_owned ( ) ,
31
+ "output-k210-uart" . to_owned ( ) ,
32
+ "interrupt-k210" . to_owned ( ) ,
33
+ "board-maix" . to_owned ( ) ,
34
+ "r3_port_riscv/maintain-pie" . to_owned ( ) ,
35
35
]
36
36
}
37
37
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ impl Target for GrPeach {
23
23
Arch :: CORTEX_A9
24
24
}
25
25
26
- fn cargo_features ( & self ) -> & [ & str ] {
27
- & [ "board-rza1" ]
26
+ fn cargo_features ( & self ) -> Vec < String > {
27
+ vec ! [ "board-rza1" . to_owned ( ) ]
28
28
}
29
29
30
30
fn memory_layout_script ( & self ) -> String {
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ impl Target for NucleoF401re {
25
25
Arch :: CORTEX_M4F
26
26
}
27
27
28
- fn cargo_features ( & self ) -> & [ & str ] {
29
- & [ "output-rtt" ]
28
+ fn cargo_features ( & self ) -> Vec < String > {
29
+ vec ! [ "output-rtt" . to_owned ( ) ]
30
30
}
31
31
32
32
fn memory_layout_script ( & self ) -> String {
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ impl Target for QemuMps2An385 {
11
11
Arch :: CORTEX_M3
12
12
}
13
13
14
- fn cargo_features ( & self ) -> & [ & str ] {
15
- & [ "output-semihosting" ]
14
+ fn cargo_features ( & self ) -> Vec < String > {
15
+ vec ! [ "output-semihosting" . to_owned ( ) ]
16
16
}
17
17
18
18
fn memory_layout_script ( & self ) -> String {
@@ -52,8 +52,8 @@ impl Target for QemuMps2An505 {
52
52
Arch :: CORTEX_M33_FPU
53
53
}
54
54
55
- fn cargo_features ( & self ) -> & [ & str ] {
56
- & [ "output-semihosting" ]
55
+ fn cargo_features ( & self ) -> Vec < String > {
56
+ vec ! [ "output-semihosting" . to_owned ( ) ]
57
57
}
58
58
59
59
fn memory_layout_script ( & self ) -> String {
@@ -95,8 +95,8 @@ impl Target for QemuRealviewPbxA9 {
95
95
Arch :: CORTEX_A9
96
96
}
97
97
98
- fn cargo_features ( & self ) -> & [ & str ] {
99
- & [ "board-realview_pbx_a9" ]
98
+ fn cargo_features ( & self ) -> Vec < String > {
99
+ vec ! [ "board-realview_pbx_a9" . to_owned ( ) ]
100
100
}
101
101
102
102
fn memory_layout_script ( & self ) -> String {
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ impl Target for QemuSiFiveE {
15
15
}
16
16
}
17
17
18
- fn cargo_features ( & self ) -> & [ & str ] {
19
- & [
20
- "boot-rt" ,
21
- "output-e310x-uart" ,
22
- "interrupt-e310x" ,
23
- "board-e310x-qemu" ,
18
+ fn cargo_features ( & self ) -> Vec < String > {
19
+ vec ! [
20
+ "boot-rt" . to_owned ( ) ,
21
+ "output-e310x-uart" . to_owned ( ) ,
22
+ "interrupt-e310x" . to_owned ( ) ,
23
+ "board-e310x-qemu" . to_owned ( ) ,
24
24
]
25
25
}
26
26
@@ -84,12 +84,12 @@ impl Target for QemuSiFiveU {
84
84
}
85
85
}
86
86
87
- fn cargo_features ( & self ) -> & [ & str ] {
88
- & [
89
- "boot-rt" ,
90
- "output-u540-uart" ,
91
- "interrupt-u540-qemu" ,
92
- "board-u540-qemu" ,
87
+ fn cargo_features ( & self ) -> Vec < String > {
88
+ vec ! [
89
+ "boot-rt" . to_owned ( ) ,
90
+ "output-u540-uart" . to_owned ( ) ,
91
+ "interrupt-u540-qemu" . to_owned ( ) ,
92
+ "board-u540-qemu" . to_owned ( ) ,
93
93
]
94
94
}
95
95
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ impl Target for RaspberryPiPico {
35
35
Arch :: CORTEX_M0
36
36
}
37
37
38
- fn cargo_features ( & self ) -> & [ & str ] {
39
- & [ "board-rp_pico" ]
38
+ fn cargo_features ( & self ) -> Vec < String > {
39
+ vec ! [ "board-rp_pico" . to_owned ( ) ]
40
40
}
41
41
42
42
fn memory_layout_script ( & self ) -> String {
You can’t perform that action at this time.
0 commit comments