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/apple/AppleToolchain.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java
index abf6f975dc..55a82c9611 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java
@@ -49,8 +49,8 @@ public class AppleToolchain {
// These next two strings are shared secrets with the xcrunwrapper.sh to allow
// expansion of DeveloperDir and SDKRoot and runtime, since they aren't known
// until compile time on any given build machine.
- @VisibleForTesting public static final String DEVELOPER_DIR = "__BAZEL_XCODE_DEVELOPER_DIR__";
- @VisibleForTesting public static final String SDKROOT_DIR = "__BAZEL_XCODE_SDKROOT__";
+ private static final String DEVELOPER_DIR = "__BAZEL_XCODE_DEVELOPER_DIR__";
+ private static final String SDKROOT_DIR = "__BAZEL_XCODE_SDKROOT__";
// These two paths are framework paths relative to SDKROOT.
@VisibleForTesting
@@ -82,7 +82,7 @@ public class AppleToolchain {
/** Returns the platform directory inside of Xcode for a platform name. */
public static String platformDir(String platformName) {
- return DEVELOPER_DIR + "/Platforms/" + platformName + ".platform";
+ return developerDir() + "/Platforms/" + platformName + ".platform";
}
/**
@@ -97,6 +97,17 @@ public class AppleToolchain {
}
/**
+ * Returns the Developer directory inside of Xcode for a given configuration.
+ */
+ @SkylarkCallable(
+ name = "developer_dir",
+ doc = "Returns the Developer directory inside of Xcode for a given configuration."
+ )
+ public static String developerDir() {
+ return DEVELOPER_DIR;
+ }
+
+ /**
* Returns the platform frameworks directory inside of Xcode for a given configuration.
*/
@SkylarkCallable(