aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelper.java14
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java1
2 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelper.java
index ce8d5bc89c..e989097ddd 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelper.java
@@ -93,14 +93,12 @@ public class CppLinkstampCompileHelper {
ImmutableList.<String>builder()
.add("GPLATFORM=\"" + cppConfiguration + "\"")
.add("BUILD_COVERAGE_ENABLED=" + (codeCoverageEnabled ? "1" : "0"))
- // G3_VERSION_INFO and G3_TARGET_NAME are C string literals that normally
- // contain the label of the target being linked. However, they are set
- // differently when using shared native deps. In that case, a single .so file
- // is shared by multiple targets, and its contents cannot depend on which
- // target(s) were specified on the command line. So in that case we have
- // to use the (obscure) name of the .so file instead, or more precisely
- // the path of the .so file relative to the workspace root.
- .add("G3_VERSION_INFO=\"${LABEL}\"")
+ // G3_TARGET_NAME is a C string literal that normally contain the label of the target
+ // being linked. However, they are set differently when using shared native deps. In
+ // that case, a single .so file is shared by multiple targets, and its contents cannot
+ // depend on which target(s) were specified on the command line. So in that case we
+ // have to use the (obscure) name of the .so file instead, or more precisely the path of
+ // the .so file relative to the workspace root.
.add("G3_TARGET_NAME=\"${LABEL}\"")
// G3_BUILD_TARGET is a C string literal containing the output of this
// link. (An undocumented and untested invariant is that G3_BUILD_TARGET is the
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java
index 1c5de3c442..2bae544c36 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java
@@ -72,7 +72,6 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase {
List<String> arguments, String platform, String targetName, String buildTargetNameSuffix) {
assertThat(arguments).contains("--sysroot=/usr/local/custom-sysroot");
assertThat(arguments).contains("-include");
- assertThat(arguments).contains("-DG3_VERSION_INFO=\"" + targetName + "\"");
assertThat(arguments).contains("-DG3_TARGET_NAME=\"" + targetName + "\"");
assertThat(arguments).contains("-DGPLATFORM=\"" + platform + "\"");
assertThat(arguments).contains("-I.");