Rust Compilation Options
To enable the Rust compiler to select a specific instruction set for different platforms, you can use the environment variable RustFLAGS to enable the compiler to generate the instruction set code of the target platform. Run the Rustc -C help command to view all RustFlags. Only two compilation options involved in porting Rust code to the Kunpeng platform are listed.
Compilation Option |
Description |
|---|---|
relocation-model=val |
Controls the PIC generation. You can run the Rustc --print relocation-models command to view details. |
target-cpu=val |
Selects a CPU. You can run the Rustc --print target-cpus command to view the supported CPUs. |
Parent topic: Porting Rust Code