Skip to content

Commit a8fc49b

Browse files
hlopkoiirina
authored andcommitted
Expose rpath entries as a build variable
Unlike commit e2239cc, this only adds "." to the rpath if isNativeDeps is true. -- PiperOrigin-RevId: 148330144 MOS_MIGRATED_REVID=148330144
1 parent a068bd1 commit a8fc49b

File tree

4 files changed

+194
-170
lines changed

4 files changed

+194
-170
lines changed

src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,12 @@ protected CppConfiguration(CppConfigurationParameters params)
403403

404404
this.toolchainIdentifier = toolchain.getToolchainIdentifier();
405405

406+
this.supportsEmbeddedRuntimes = toolchain.getSupportsEmbeddedRuntimes();
406407
toolchain = addLegacyFeatures(toolchain);
407408
this.toolchainFeatures = new CcToolchainFeatures(toolchain);
408409
this.supportsGoldLinker = toolchain.getSupportsGoldLinker();
409410
this.supportsStartEndLib = toolchain.getSupportsStartEndLib();
410411
this.supportsInterfaceSharedObjects = toolchain.getSupportsInterfaceSharedObjects();
411-
this.supportsEmbeddedRuntimes = toolchain.getSupportsEmbeddedRuntimes();
412412
this.supportsFission = toolchain.getSupportsFission();
413413
this.toolchainNeedsPic = toolchain.getNeedsPic();
414414
this.usePicForBinaries =
@@ -727,12 +727,12 @@ private CToolchain addLegacyFeatures(CToolchain toolchain) {
727727
if (getTargetLibc().equals("macosx")) {
728728
TextFormat.merge(
729729
CppLinkActionConfigs.getCppLinkActionConfigs(
730-
CppLinkPlatform.MAC, features, linkerToolPath),
730+
CppLinkPlatform.MAC, features, linkerToolPath, supportsEmbeddedRuntimes),
731731
toolchainBuilder);
732732
} else {
733733
TextFormat.merge(
734734
CppLinkActionConfigs.getCppLinkActionConfigs(
735-
CppLinkPlatform.LINUX, features, linkerToolPath),
735+
CppLinkPlatform.LINUX, features, linkerToolPath, supportsEmbeddedRuntimes),
736736
toolchainBuilder);
737737
}
738738
}

0 commit comments

Comments
 (0)