aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-01-15 17:57:10 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-15 22:29:42 +0000
commit725521761e8231d97f172f064b044e17bdd37374 (patch)
treed347dfec3a6a45f75c51407ba4f27ff5fb1b52e6 /src
parent67e6f98d7659ac41154f93c39e548ba0ecc43c80 (diff)
Libc top for the host should take its value only from --host_grte_top or the host crosstool.
RELNOTES[NEW]: --grte_top no longer also sets --host_grte_top in the absence of the latter -- MOS_MIGRATED_REVID=112258796
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java15
1 files changed, 7 insertions, 8 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 4733e741d0..a1015979e7 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
@@ -398,8 +398,8 @@ public class CppOptions extends FragmentOptions {
defaultValue = "null",
converter = LabelConverter.class,
category = "semantics",
- help = "By default, the --crosstool_top, --glibc, and --compiler options are also used " +
- "for the host configuration. If this flag is provided, Blaze uses the default glibc " +
+ help = "By default, the --crosstool_top and --compiler options are also used " +
+ "for the host configuration. If this flag is provided, Blaze uses the default libc " +
"and compiler for the given crosstool_top.")
public Label hostCrosstoolTop;
@@ -486,12 +486,11 @@ public class CppOptions extends FragmentOptions {
}
}
- if (hostLibcTop != null) {
- host.libcTop = hostLibcTop;
- } else if (hostCrosstoolTop == null) {
- // Track libc in the host configuration if no host crosstool is set.
- host.libcTop = libcTop;
- }
+ // 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
+ // by --host_crosstool_top, or --crosstool_top as a fallback) says it should be.
+ host.libcTop = hostLibcTop;
// -g0 is the default, but allowMultiple options cannot have default values so we just pass
// -g0 first and let the user options override it.