Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Merged PR 1111: Work around a break in incremental builds.
Browse files Browse the repository at this point in the history
Incremental builds are broken in Mu release/201903 due to an improper use of unordered set() and dict() types.

By pinning the PYTHONHASHSEED prior to calling build.py, we ensure that the order is at least consistent from build to build.
  • Loading branch information
Bret Barkelew committed Apr 19, 2019
1 parent b77c844 commit c59beb4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MuEnvironment/UefiBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,17 @@ def Build(self):
for key, value in buildvars.items():
params += " -D " + key + "=" + value
output_stream = MuLogging.create_output_stream()

env = ShellEnvironment.ShellEnvironment()
# WORKAROUND - Pin the PYTHONHASHSEED so that TianoCore build tools
# have consistent ordering. Addresses incremental builds.
pre_build_env_chk = env.checkpoint()
env.set_shell_var('PYTHONHASHSEED', '0')
env.log_environment()
ret = RunCmd("build", params)
# WORKAROUND - Undo the workaround.
env.restore_checkpoint(pre_build_env_chk)

problems = MuLogging.scan_compiler_output(output_stream)
MuLogging.remove_output_stream(output_stream)
for level, problem in problems:
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Version History
Main Changes:

- Errors and warnings from the compiler are now intermingled and displayed in the order that they are emitted.
- Add a workaround for incremental build break in Mu release/201903. Pinning PYTHONHASHSEED prevents unordered set() and dict() structures from changing build-to-build.


0.3.8
Expand Down

0 comments on commit c59beb4

Please sign in to comment.