Add a getter for --grte_top value

RELNOTES: None.
PiperOrigin-RevId: 210708961
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
index 00be2f2..29ef01a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
@@ -1229,4 +1229,11 @@
   boolean enableCcToolchainConfigInfoFromSkylark() {
     return cppOptions.enableCcToolchainConfigInfoFromSkylark;
   }
+
+  /**
+   * Returns the value of the libc top-level directory (--grte_top) as specified on the command line
+   */
+  public Label getLibcTopLabel() {
+    return cppOptions.libcTopLabel;
+  }
 }