Skip to content

Commit 3da90ad

Browse files
nslowellcarlescufi
authored andcommitted
cmake: use all compile options arguments for uniqueness
zephyr_library_compile_options() was attempting to create unique hashes for compile options in order to prevent creating them multiple times. However, it was only using the first argument to create the hash, so if multiple libraries had different compile options but the first line was the same, the second set would be mistaken for the first set and would actually be passed the first set during compilation instead of its own set. The fix should be to use the entire compile options argument list to create the hash so they should only match if the entire options list is exactly the same. This is a continued fix for #43835 Signed-off-by: Nicholas Lowell <[email protected]>
1 parent 0c05319 commit 3da90ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/extensions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function(zephyr_library_compile_options item)
497497
# zephyr_interface will be the first interface library that flags
498498
# are taken from.
499499

500-
string(MD5 uniqueness ${item})
500+
string(MD5 uniqueness "${ARGV}")
501501
set(lib_name options_interface_lib_${uniqueness})
502502

503503
if (NOT TARGET ${lib_name})

0 commit comments

Comments
 (0)