File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 44
44
45
45
- name : Setup Rust
46
46
run : |
47
- rustup update stable
47
+ rustup install nightly
48
48
rustup target add thumbv7em-none-eabihf
49
49
cargo install cbindgen
50
50
Original file line number Diff line number Diff line change @@ -4,9 +4,13 @@ version = "0.1.0"
4
4
edition = " 2021"
5
5
publish = false
6
6
7
+ [profile .dev ]
8
+ panic = " abort"
9
+
7
10
[profile .release ]
8
11
opt-level = ' z' # turn on maximum optimizations. We only have 64kB
9
12
lto = true # Link-time-optimizations for further size reduction
13
+ panic = " abort"
10
14
11
15
[lib ]
12
16
crate-type = [" staticlib" ]
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ RUSTEMU_INCLUDE_DIR := $(RUSTEMU_DIR)/include/
22
22
RUSTEMU_TARGET_DIR := $(RUSTEMU_DIR ) /target/x86_64-unknown-linux-gnu/release
23
23
RUSTEMU_HEADER := $(RUSTEMU_INCLUDE_DIR ) /rustemu.h
24
24
RUSTEMU_LIBRARY := $(RUSTEMU_TARGET_DIR ) /librustemu.a
25
- RUSTEMU_SRC := $(shell find $(RUSTEMU_DIR ) /src -name '* .rs')
25
+ RUSTEMU_SOURCES := $(shell find $(RUSTEMU_DIR ) /src -name '* .rs')
26
26
27
27
include $(ROOT ) /make/system-id.mk
28
28
include $(ROOT ) /make/targets_list.mk
@@ -678,11 +678,11 @@ $(OBJECT_DIR)/gtest_main.a : $(OBJECT_DIR)/gtest-all.o $(OBJECT_DIR)/gtest_main.
678
678
-include $(OBJECT_DIR ) /gtest-all.d \
679
679
$(OBJECT_DIR)/gtest_main.d
680
680
681
- $(RUSTEMU_LIBRARY ) : $(RUSTEMU_SRC )
682
- cd $(ROOT ) /src/rustemu && cargo build --release
681
+ $(RUSTEMU_LIBRARY ) : $(RUSTEMU_SOURCES )
682
+ cd $(ROOT ) /src/rustemu && cargo +nightly build --release
683
683
684
684
$(RUSTEMU_HEADER ) : $(RUSTEMU_LIBRARY )
685
- cd $(ROOT ) /src/rustemu && cbindgen --lang c -o $(PWD ) /$(RUSTEMU_HEADER )
685
+ cd $(ROOT ) /src/rustemu && cbindgen --lang c++ -o $(PWD ) /$(RUSTEMU_HEADER )
686
686
687
687
# includes in test dir must override includes in user dir, unless the user
688
688
# specifies a list of endorsed directories in ${target}_INCLUDE_DIRS.
You can’t perform that action at this time.
0 commit comments