Skip to content

Commit

Permalink
scripts/build: make struct_tags.json deterministic
Browse files Browse the repository at this point in the history
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
f896fc2 ("scripts: gen_handles: Sort the device handles")

Simply convert multiple_directories to a sorted list before using it.

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

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb authored and carlescufi committed Dec 11, 2023
1 parent 79b00f6 commit 352980b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/build/parse_syscalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 352980b

Please sign in to comment.