-
Notifications
You must be signed in to change notification settings - Fork 7.5k
app shared memory rules in CMakeLists.txt breaks incremental builds #13001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
NB: Reproduced for mps2_an385, but not qemu_x86. |
You're right, in master branch qemu_x86 doesn't use the region script. Forthcoming changes #12990 it will. |
I think I have a fix, I'd prefer to apply it to #12990 instead of master, is that OK @andrewboie ? |
Nevermind ... 12990 is now merged ... |
This commit applies various refactorings and whitespace fixes in preparation for the patch that fixes zephyrproject-rtos#13001. It includes changing indentation from tabs to spaces and splitting tokens across more lines to increase readability and minimize patch sizes. Signed-off-by: Sebastian Bøe <[email protected]>
The dependencies relating to generating LD scripts are declared incorrectly. This manifests itself as broken incremental builds as shown in zephyrproject-rtos#13001. This commit aligns the LD script generation with the Zephyr standard for declaring custom commands. For instance, custom commands should generate files that are wrapped by targets. The custom commands should declare the dependencies, not the targets. Also, when using custom commands, the OUTPUT signature should be used, not the TARGET signature, as app_smem was doing. For details about how Zephyr uses custom commands see https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ This fixes zephyrproject-rtos#13001. Signed-off-by: Sebastian Bøe <[email protected]>
This commit applies various refactorings and whitespace fixes in preparation for the patch that fixes #13001. It includes changing indentation from tabs to spaces and splitting tokens across more lines to increase readability and minimize patch sizes. Signed-off-by: Sebastian Bøe <[email protected]>
The dependencies relating to generating LD scripts are declared incorrectly. This manifests itself as broken incremental builds as shown in #13001. This commit aligns the LD script generation with the Zephyr standard for declaring custom commands. For instance, custom commands should generate files that are wrapped by targets. The custom commands should declare the dependencies, not the targets. Also, when using custom commands, the OUTPUT signature should be used, not the TARGET signature, as app_smem was doing. For details about how Zephyr uses custom commands see https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ This fixes #13001. Signed-off-by: Sebastian Bøe <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If CONFIG_APP_SHARED_MEM is enabled, there is a build step to scan all the compiled .o files to generate a linker script containing application shared memory sections:
Unfortuantely, this is messing with incremental builds. If I run 'make', and then run 'make' again, I would expect the build to finish immediately. Instead, every build step after app_smem_linker is repeated:
I would expect the output of a second make to more resemble:
The script works by scanning all the .obj files in the build output directory looking for section names. The script is being unconditionally run:
It should instead have as a dependency all the object files in the output dir, and only run if any are added/changed/removed.
To Reproduce
Steps to reproduce the behavior:
Build tests/kernel/mem_protect/userspace twice on mps2_an385 or qemu_x86
Or pull #12990 and build any test twice.
The text was updated successfully, but these errors were encountered: