Include compiler versions in build directory name #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, the build script ignored differing versions of the C and Fortran compilers; it built OpenBLAS in a directory named only by the target. Now, the build script gets information about the build environment, including the C and Fortran compiler versions, and includes a hash of that information in the build directory name. It also writes the build information to a file named
.openblas-src_build_infoin the build directory to help with debugging.The result of this change is that when the C or Fortran compiler is changed (e.g. by a system update or by the user specifying the compiler version in environment variables), OpenBLAS will be rebuilt.
The hasher selected for hashing the build information is
std::collections::hash_map::DefaultHasher::new()simply because it's included in the standard library, so the build script doesn't need extra dependencies. The disadvantage of this hasher is that its output is not guaranteed to be stable across different Rust releases. As a result, with a new Rust release, OpenBLAS may be rebuilt unnecessarily.