mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/riscv_common: Enable Rust applications
This contains a workaround for https://github.com/rust-lang/rust-bindgen/issues/1555 (withouot which bindgen would fail, with little information helping remedy the cause)
This commit is contained in:
parent
ace880dddf
commit
d391b1c5f4
@ -12,7 +12,7 @@ config CPU_ARCH_RISCV
|
||||
select HAS_NEWLIB
|
||||
select HAS_PERIPH_CORETIMER
|
||||
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
||||
#select HAS_RUST_TARGET
|
||||
select HAS_RUST_TARGET
|
||||
select HAS_SSP
|
||||
|
||||
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG
|
||||
|
@ -8,7 +8,7 @@ FEATURES_PROVIDED += cpp
|
||||
FEATURES_PROVIDED += libstdcpp
|
||||
FEATURES_PROVIDED += newlib
|
||||
FEATURES_PROVIDED += periph_coretimer
|
||||
#FEATURES_PROVIDED += rust_target
|
||||
FEATURES_PROVIDED += rust_target
|
||||
FEATURES_PROVIDED += ssp
|
||||
|
||||
# RISC-V toolchain on CI does not work properly with picolibc yet
|
||||
|
@ -11,7 +11,9 @@ CARGO_COMPILE_COMMANDS_FLAGS = --clang
|
||||
$(CARGO_COMPILE_COMMANDS): $(BUILDDEPS)
|
||||
$(Q)DIRS="$(DIRS)" APPLICATION_BLOBS="$(BLOBS)" \
|
||||
"$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk compile-commands
|
||||
@# replacement addresses https://github.com/rust-lang/rust-bindgen/issues/1555
|
||||
$(Q)$(RIOTTOOLS)/compile_commands/compile_commands.py $(CARGO_COMPILE_COMMANDS_FLAGS) $(BINDIR) \
|
||||
| sed 's/"riscv-none-embed"/"riscv32"/g' \
|
||||
| $(LAZYSPONGE) $@
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user