Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extensions.cmake: need unique strings, not random ones
1. To support being called multiple times, the function zephyr_library_compile_options() uses unique options_interface_lib_${random} names. These only need to be unique, not random. So replace them with a simple MD5 hash of the ${item} argument. To reproduce quickly run: sanitycheck -b -p qemu_xtensa --tag shell ... a few times and compare the output directories. This bug sits for now at the top of the list of build reproducibility issues the most bizarre and difficult to root cause. When running sanitycheck over a large sample of configurations it was affecting only qemu_xtensa/**/zephyr/arch/arch/xtensa/core/startup/Makefile files (and their corresponding CMakeFiles/TargetDirectories.txt), randomly ordering the following three Make targets and only these three: rebuild_cache, edit_cache, arch__xtensa__core__startup. The key to root causing was cmake --trace-expand which prints the random string. 2. generate_unique_target_name_from_filename() also generated a random string for the same uniqueness reason. This one was easier to root cause and reproduce with: sanitycheck --tag gen_inc_file Signed-off-by: Marc Herbert <[email protected]>
- Loading branch information