pkg-cargo currently sets the --release flag unless BR2_ENABLE_DEBUG is set. However, this does not accurately reflect the configured build settings. In addition, it only works for packages that use the cargo infrastructure directory and not with packages using the cargo environment indirectly, such as pyo3 based python packages. To support these, we really want to pass the necessary flags in PKG_CARGO_ENV. In order to accurately reflect the configured build settings (optimization and debug levels), we set the appropriate environment variables according to the global settings. There is no way to specify the profile to use through an environment variable, it has to be set through a cargo flag like --release. Since we can't easily control the profile flags used by non-cargo package infrastructures, we instead set the env variables for both root profiles (dev/release). For the aspects that are not affected by the global settings (incremental, codegen-units, split-debuginfo), we set them equal to the default for release - which in our context is the appropriate choice even when BR2_ENABLE_DEBUG is set. For reference the default cargo root profile settings are: https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles Cc: Moritz Bitsch <moritz@h6t.eu> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Tested-by: Moritz Bitsch <moritz@h6t.eu> Tested-by: Adam Duskett <adam.duskett@amarulasolutions.com> Reviewed-by: Adam Duskett <adam.duskett@amarulasolutions.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.checkpackageignore | ||
.clang-format | ||
.defconfig | ||
.editorconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.shellcheckrc | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches