Fixes: #30712
Now using zephyr_get_compile_options_for_lang_as_string for makefile
export of Zephyr build flags.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #28230
The introduction of CMake SHELL prefix in compile options to avoid
symbol de-duplication caused the build flag export feature to fail.
The export itself works, but unfortunately CMake only strips `SHELL`
prefix for its own compiler invocation, and not when exporting the build
flags.
This causes `SHELL` to be present in the Makefile.exports.<language>
files, leading to problems in external build systems.
This is fixed by using `zephyr_get_compile_options_for_lang()` that
strips `SHELL` and use the returned value for the export handling.
To ensure all compile options has been defined, then the inclusion of
`cmake/makefile_exports` has been moved to the end of
`zephyr/CMakeLists.txt` file.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add an opt-in feature that will generate a Makefile with build
variables like CC, and KBUILD_CFLAGS for consumption by third-party
Make-based build systems.
This emulates the 'outputexports' target that KBuild supported and is
supported for the same reasons that KBuild supported it. Easier
integration with third-party build systems.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>