diff options
author | 2016-11-17 20:14:56 +0000 | |
---|---|---|
committer | 2016-11-18 10:54:32 +0000 | |
commit | 39dbc9805f9d60acc9a98685826d2a5bb2dd0908 (patch) | |
tree | b2a51fcbe5ab211ff2efc02fd4a8e95933fa89ec /src/main/java/com/google/devtools/build/lib/rules/cpp | |
parent | bede7b47d88c3892c47382ed39911117e48adc70 (diff) |
Adding an option to set the digest function that everything uses. Minor refactoring: enabling potential fast digest computation of more than one digest function type.
Usage: bazel --host_jvm_args="-Dbazel.DigestFunction=SHA1" build ...
Ugliness: using a system property (a static non-final variable), because the better way to do it (a flag) would result in a much, much larger refactoring.
More ugliness: I have updated the minimal amount of tests. A lot of tests are still relying on the default value of MD5. Ideally, they need to be updated as well.
--
MOS_MIGRATED_REVID=139490836
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java index 7201797025..29ace2f135 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java @@ -220,7 +220,7 @@ public class CrosstoolConfigurationLoader { return null; } - return new CrosstoolProto(path.getMD5Digest(), "CROSSTOOL file " + path.getPathString()) { + return new CrosstoolProto(path.getDigest(), "CROSSTOOL file " + path.getPathString()) { @Override public String getContents() throws IOException { try (InputStream inputStream = path.getInputStream()) { |