aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/standalone
diff options
context:
space:
mode:
authorGravatar jmmv <jmmv@google.com>2018-04-28 20:50:50 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-28 20:51:57 -0700
commit3a292efa55075e020d60daeeb7566b7e2ea721c2 (patch)
tree325f711d6728ad29b75268552dc667c455a2b743 /src/main/java/com/google/devtools/build/lib/standalone
parent1b672c2d15cea87e525faace615e1eb1fd6851fa (diff)
Remove the on-disk caching of Xcode locations.
There is no need for the cache to be on disk. Originally, there was a desire to share this cache with other tools... but this never happened. And, actually, because Bazel is in control of what it runs, it can just inject the "cached" values into those tools via flags. Instead, just store the cache in-memory. This avoids having to open and read the cache on every single action that is locally executed on a Mac. Results when building a large iOS app from a clean slate show up to a 1% wall time improvement on my Mac Pro 2013 and a reduction in the variance of the measurements. This change also gets rid of the OS check from the action execution's critical path. There is not much use in checking this: if we instantiate this by mistake, the actual calls will fail. But sometimes we want to actually run this code on non-macOS systems (e.g. for unit-testing with mocked tools), so we should allow that. And this change also ensures that XcodeLocalEnvProviderTest builds and runs... RELNOTES: None. PiperOrigin-RevId: 194681802
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/standalone')
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java
index 74cab934d1..2b1c6fd7ef 100644
--- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java
@@ -72,7 +72,7 @@ public class StandaloneActionContextProvider extends ActionContextProvider {
env.getOptions().getOptions(LocalExecutionOptions.class);
LocalEnvProvider localEnvProvider =
OS.getCurrent() == OS.DARWIN
- ? new XcodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv())
+ ? new XcodeLocalEnvProvider(env.getClientEnv())
: (OS.getCurrent() == OS.WINDOWS
? new WindowsLocalEnvProvider(env.getClientEnv())
: new PosixLocalEnvProvider(env.getClientEnv()));