scripts/build: make struct_tags.json deterministic

It's not good to see struct_tags.json change from one build to the next
when nothing changes.

Python's sets are not deterministic, see long story for older commit
f896fc2306 ("scripts: gen_handles: Sort the device handles")

Simply convert multiple_directories to a sorted list before using it.

Fixes commit 80e78208e6 ("kernel: syscalls: no need to include all
syscalls in binary")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-12-01 06:55:52 +00:00 committed by Carles Cufí
parent 79b00f6cd3
commit 352980be98
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ def analyze_headers(include_dir, scan_dir, file_list):
if scan_dir:
multiple_directories |= set(scan_dir)
# Convert to a list to keep the output deterministic
multiple_directories = sorted(multiple_directories)
# Look for source files under various directories.
# Due to "syscalls/*.h" being included unconditionally in various
# other header files. We must generate the associated syscall