-
Notifications
You must be signed in to change notification settings - Fork 300
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
zephyr/CMakeLists.txt: remove '..' in include paths #7428
Conversation
Some zephyr.lst differences in https://github.com/thesofproject/sof/actions/runs/4662244951/jobs/8252512487?pr=7428, interesting... |
The ASSERTs built on Windows have a mix of forward and backward slashes. There are 63 WEST_TOPDIR paths with forward slashes and 6 with backward slashes:
@stephanosio any idea? EDIT, found something: all the paths with backward slashes have at least one
EDIT: difference fixed by removing |
CMake seems to behave differently on Linux and Windows: it generates different `-I` command line parameters. This results in spurious `__FILE__` mismatches and non-reproducible builds when using CONFIG_ASSERT, see example in thesofproject#7428. On Windows, '..' seem resolved more often which also seems to convert forward slashes to backslashes. They are also less readable and wasting a bit of space. Remove them using cmake_path(SET ...) Signed-off-by: Marc Herbert <marc.herbert@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One question , see inline comment
.github/workflows/zephyr.yml
Outdated
@@ -131,7 +131,7 @@ jobs: | |||
- name: build | |||
run: cd workspace && ./sof/zephyr/docker-run.sh | |||
./sof/zephyr/docker-build.sh --cmake-args=-DEXTRA_CFLAGS=-Werror | |||
--cmake-args=--warn-uninitialized ${{ matrix.IPC_platforms }} | |||
--cmake-args=--warn-uninitialized -d ${{ matrix.IPC_platforms }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marc-hb Should we have both -d and non -d builds? If we can only have one, I'd say the non-debug build is more important to verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be easy to build both -d
and not but I'm concerned about the combinatorial explosion and making the small "checks" box at the bottom of the "Conversation" tab more unreadable than it already is. Or we could connsider that box a lost cause and get people into the habit of alway switching to the "Checks" tab? I could also save some space but grouping all IPC3 (imx and tgl) together.
Note quickbuild already builds without -d every time, however its log is often hard to find. This being said, I don't remember a case when -d
was OK while the build failed without or vice-versa, so convenient access to logs of a problem that almost never happens is not critical.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @kv2019i on this one. As you said Marc, building whole array with -d flag would result in so many builds...
I think we should stick with just a "production" build.
EDIT:
And now I think about all those ASSERT macros that would not be verified by the "production" build.
@marc-hb I think we should run both. I know it's a lot of builds but well, its common practice for projects to build production and debug builds. Besides, I think debug_overlay may grow in future, we need to verify this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github Actions allow "sparse" matrices. So I found a way to add -d
only for MTL, submitted in
Make sure users do not misinterpret our single `debug_overlay.conf` file as some kind of complex and elaborate "debug build" concept. Also save users who want to see the file a lot of time by naming it directly in the --help. Empty layers of indirection are just spurious obfuscation. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@kv2019i , @aborisovich I removed the github checks changes for now, let's discuss them later in another PR. It's more urgent to fix CONFIG_ASSERT reproducibility than to test it. So this PR should be a no-brainer now. EDIT, see also:
|
CMake seems to behave differently on Linux and Windows: it generates different `-I` command line parameters. This results in spurious `__FILE__` mismatches and non-reproducible builds when using CONFIG_ASSERT, see example in #7428. On Windows, '..' seem resolved more often which also seems to convert forward slashes to backslashes. They are also less readable and wasting a bit of space. Remove them using cmake_path(SET ...) Signed-off-by: Marc Herbert <marc.herbert@intel.com>
zephyr/CMakeLists.txt: remove '..' in include paths
CMake seems to behave differently on Linux and Windows: it generates
different
-I
command line parameters. This results in spurious__FILE__
mismatches and non-reproducible builds when usingCONFIG_ASSERT, see example in #7428.
On Windows, '..' seem resolved more often which also seems to convert
forward slashes to backslashes.
They are also less readable and wasting a bit of space. Remove them
using cmake_path(SET ...)
Zephyr's
-fmacro-prefix-map
is working and keeps the builds reproducible when using a recent enough toolchain.As found in the CONFIG_ASSERT PR #6530 (comment) this is not true for old Xtensa toolchains which don't support
-fmacro-prefix-map