aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-07-18 11:28:14 +0200
committerGravatar Klaus Aehlig <aehlig@google.com>2017-07-18 11:42:19 +0200
commit8457eedb0eb4ee0ded142ea4d5dd8f9f1b53d875 (patch)
treec5258f4e7263647cff191edb8ba1b5ed519d3537 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
parent61536c3259a138a6268b56388bc71a4a91ab0db0 (diff)
Add an option to remove the toolchain identifier from the name of the output directory.
This will probably need some more work so that there are no name clashes with e.g. Android output directory names, but let's take one step at a time. RELNOTES: None. PiperOrigin-RevId: 162328750
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
index 9c8e5a536b..97492ae816 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
@@ -540,6 +540,16 @@ public class CppOptions extends FragmentOptions {
*/
public Label lipoContextForBuild;
+ @Option(
+ name = "experimental_toolchain_id_in_output_directory",
+ defaultValue = "true",
+ category = "semantics",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = OptionEffectTag.AFFECTS_OUTPUTS,
+ help = "Whether to embed the name of the C++ toolchain in the name of the output directory"
+ )
+ public boolean toolchainIdInOutputDirectory;
+
/**
* Returns the --lipo_context value if LIPO is specified and active for this configuration,
* null otherwise.
@@ -840,6 +850,11 @@ public class CppOptions extends FragmentOptions {
}
}
+ // the name of the output directory for the host configuration is forced to be "host" in
+ // BuildConfiguration.Options#getHost(), but let's be prudent here in case someone ends up
+ // removing that
+ host.toolchainIdInOutputDirectory = toolchainIdInOutputDirectory;
+
// hostLibcTop doesn't default to the target's libcTop.
// Only an explicit command-line option will change it.
// The default is whatever the host's crosstool (which might have been specified