use of com.google.devtools.build.lib.util.Fingerprint in project bazel by bazelbuild.
the class CppLinkAction method computeKey.
@Override
protected String computeKey() {
Fingerprint f = new Fingerprint();
f.addString(fake ? FAKE_LINK_GUID : LINK_GUID);
f.addString(getCppConfiguration().getLdExecutable().getPathString());
f.addStrings(linkCommandLine.arguments());
f.addStrings(getExecutionInfo().keySet());
// TODO(bazel-team): For correctness, we need to ensure the invariant that all values accessed
// during the execution phase are also covered by the key. Above, we add the argv to the key,
// which covers most cases. Unfortunately, the extra action and fake support methods above also
// sometimes directly access settings from the link configuration that may or may not affect the
// key. We either need to change the code to cover them in the key computation, or change the
// LinkConfiguration to disallow the combinations where the value of a setting does not affect
// the argv.
f.addBoolean(linkCommandLine.isNativeDeps());
f.addBoolean(linkCommandLine.useTestOnlyFlags());
if (linkCommandLine.getRuntimeSolibDir() != null) {
f.addPath(linkCommandLine.getRuntimeSolibDir());
}
f.addBoolean(isLTOIndexing);
return f.hexDigestAndReset();
}
use of com.google.devtools.build.lib.util.Fingerprint in project bazel by bazelbuild.
the class LTOBackendAction method computeKey.
@Override
protected String computeKey() {
Fingerprint f = new Fingerprint();
f.addString(GUID);
f.addStrings(getArguments());
f.addString(getMnemonic());
f.addPaths(getRunfilesSupplier().getRunfilesDirs());
ImmutableList<Artifact> runfilesManifests = getRunfilesSupplier().getManifests();
for (Artifact runfilesManifest : runfilesManifests) {
f.addPath(runfilesManifest.getExecPath());
}
for (Artifact input : getMandatoryInputs()) {
f.addPath(input.getExecPath());
}
for (PathFragment bitcodePath : bitcodeFiles.keySet()) {
f.addPath(bitcodePath);
}
f.addPath(imports.getExecPath());
f.addStringMap(getEnvironment());
f.addStringMap(getExecutionInfo());
return f.hexDigestAndReset();
}
use of com.google.devtools.build.lib.util.Fingerprint in project bazel by bazelbuild.
the class WriteBuildInfoHeaderAction method computeKey.
@Override
protected String computeKey() {
Fingerprint f = new Fingerprint();
f.addString(GUID);
f.addBoolean(writeStableInfo);
f.addBoolean(writeVolatileInfo);
return f.hexDigestAndReset();
}
use of com.google.devtools.build.lib.util.Fingerprint in project bazel by bazelbuild.
the class CreateIncSymlinkAction method computeKey.
@Override
public String computeKey() {
Fingerprint key = new Fingerprint();
for (Map.Entry<Artifact, Artifact> entry : symlinks.entrySet()) {
key.addPath(entry.getKey().getPath());
key.addPath(entry.getValue().getPath());
}
return key.hexDigestAndReset();
}
use of com.google.devtools.build.lib.util.Fingerprint in project bazel by bazelbuild.
the class CppModuleMapAction method computeKey.
@Override
protected String computeKey() {
Fingerprint f = new Fingerprint();
f.addString(GUID);
f.addInt(privateHeaders.size());
for (Artifact artifact : privateHeaders) {
f.addPath(artifact.getExecPath());
}
f.addInt(publicHeaders.size());
for (Artifact artifact : publicHeaders) {
f.addPath(artifact.getExecPath());
}
f.addInt(dependencies.size());
for (CppModuleMap dep : dependencies) {
f.addPath(dep.getArtifact().getExecPath());
}
f.addInt(additionalExportedHeaders.size());
for (PathFragment path : additionalExportedHeaders) {
f.addPath(path);
}
f.addPath(cppModuleMap.getArtifact().getExecPath());
f.addString(cppModuleMap.getName());
f.addBoolean(moduleMapHomeIsCwd);
f.addBoolean(compiledModule);
f.addBoolean(generateSubmodules);
f.addBoolean(externDependencies);
return f.hexDigestAndReset();
}
Aggregations