diff options
author | Googler <noreply@google.com> | 2015-06-25 02:36:02 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-25 08:57:15 +0200 |
commit | 91c69f025d4cf4380c37c878f1aa1120ef31abcc (patch) | |
tree | 2a6b16110ff2f5a3236b99aae5dde59cc1838e2b /src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java | |
parent | 7ae29d2617e1039380df2b8fb3ee45286ba64dab (diff) |
Setup FDO command-line options via feature configurations.
--
MOS_MIGRATED_REVID=96835732
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java index 46988c91bb..b6e9f24407 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java @@ -445,7 +445,8 @@ public final class CppLinkAction extends AbstractAction { */ public static class Builder { // Builder-only - private final RuleContext ruleContext; + // Null when invoked from tests (e.g. via createTestBuilder). + @Nullable private final RuleContext ruleContext; private final AnalysisEnvironment analysisEnvironment; private final PathFragment outputPath; @@ -508,7 +509,7 @@ public final class CppLinkAction extends AbstractAction { * @param configuration the configuration used to determine the tool chain * and the default link options */ - private Builder(RuleContext ruleContext, PathFragment outputPath, + private Builder(@Nullable RuleContext ruleContext, PathFragment outputPath, BuildConfiguration configuration, AnalysisEnvironment analysisEnvironment, CcToolchainProvider toolchain) { this.ruleContext = ruleContext; @@ -642,7 +643,7 @@ public final class CppLinkAction extends AbstractAction { : null; LinkCommandLine linkCommandLine = - new LinkCommandLine.Builder(configuration, getOwner()) + new LinkCommandLine.Builder(configuration, getOwner(), ruleContext) .setOutput(outputLibrary.getArtifact()) .setInterfaceOutput(interfaceOutput) .setSymbolCountsOutput(symbolCountOutput) |