diff options
author | Greg Estren <gregce@google.com> | 2016-01-30 00:08:17 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-01 09:45:56 +0000 |
commit | de1f64c0e49a67c0fa774d222e97314ae9b30b83 (patch) | |
tree | b0cb5e96ae26d4bd41077103258acd453a0d71fb /src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java | |
parent | 6ca35fc0dda3ac62f4ad1850d74ba2f3189da009 (diff) |
Contractually document BuildConfiguration.Fragment as immutable and strengthen
the immutability interfaces of existing implementations.
Eventually we want all implementations to comply, but right now CppConfiguration
is a glaring exception due to FDO/LIPO support.
We don't want more exceptions to arise.
This is prep work for pre-trimming ConfigurationFragment.key's BuildOptions input
to just the options needed by the fragment. That implies fragments can be shared across configurations, so that needs to be safe.
--
MOS_MIGRATED_REVID=113408041
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java index 9ffcefa4e7..3898906374 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java @@ -14,11 +14,13 @@ package com.google.devtools.build.lib.rules.python; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; +import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; /** * The configuration fragment containing information about the various pieces of infrastructure * needed to run Python compilations. */ +@Immutable public class PythonConfiguration extends BuildConfiguration.Fragment { private final boolean ignorePythonVersionAttribute; private final PythonVersion defaultPythonVersion; |