Merge "Compiler-rt libraries now use i386 instead of i686"
diff --git a/core/config.mk b/core/config.mk
index 488cf9c..e9b5d4c 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -840,6 +840,37 @@
BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt)
BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt)
+# SEPolicy versions
+
+# PLATFORM_SEPOLICY_VERSION is a number of the form "NN.m" with "NN" mapping to
+# PLATFORM_SDK_VERSION and "m" as a minor number which allows for SELinux
+# changes independent of PLATFORM_SDK_VERSION. This value will be set to
+# 10000.0 to represent tip-of-tree development that is inherently unstable and
+# thus designed not to work with any shipping vendor policy. This is similar in
+# spirit to how DEFAULT_APP_TARGET_SDK is set.
+# The minor version ('m' component) must be updated every time a platform release
+# is made which breaks compatibility with the previous platform sepolicy version,
+# not just on every increase in PLATFORM_SDK_VERSION. The minor version should
+# be reset to 0 on every bump of the PLATFORM_SDK_VERSION.
+sepolicy_major_vers := 27
+sepolicy_minor_vers := 0
+
+ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION))
+$(error sepolicy_major_version does not match PLATFORM_SDK_VERSION, please update.)
+endif
+ifneq (REL,$(PLATFORM_VERSION_CODENAME))
+ sepolicy_major_vers := 10000
+ sepolicy_minor_vers := 0
+endif
+PLATFORM_SEPOLICY_VERSION := $(join $(addsuffix .,$(sepolicy_major_vers)), $(sepolicy_minor_vers))
+sepolicy_major_vers :=
+sepolicy_minor_vers :=
+
+# A list of SEPolicy versions, besides PLATFORM_SEPOLICY_VERSION, that the framework supports.
+PLATFORM_SEPOLICY_COMPAT_VERSIONS := \
+ 26.0 \
+ 27.0
+
# ###############################################################
# Set up final options.
# ###############################################################
diff --git a/tools/releasetools/blockimgdiff.py b/tools/releasetools/blockimgdiff.py
index b1ad8b6..931026b 100644
--- a/tools/releasetools/blockimgdiff.py
+++ b/tools/releasetools/blockimgdiff.py
@@ -191,8 +191,7 @@
self.tgt_sha1 = tgt_sha1
self.src_sha1 = src_sha1
self.style = style
- self.intact = (getattr(tgt_ranges, "monotonic", False) and
- getattr(src_ranges, "monotonic", False))
+ self.intact = tgt_ranges.monotonic and src_ranges.monotonic
# We use OrderedDict rather than dict so that the output is repeatable;
# otherwise it would depend on the hash values of the Transfer objects.
diff --git a/tools/releasetools/rangelib.py b/tools/releasetools/rangelib.py
index 8af61c3..36becf4 100644
--- a/tools/releasetools/rangelib.py
+++ b/tools/releasetools/rangelib.py
@@ -13,15 +13,22 @@
# limitations under the License.
from __future__ import print_function
+
import heapq
import itertools
+
__all__ = ["RangeSet"]
+
class RangeSet(object):
- """A RangeSet represents a set of nonoverlapping ranges on the
- integers (ie, a set of integers, but efficient when the set contains
- lots of runs."""
+ """A RangeSet represents a set of non-overlapping ranges on integers.
+
+ Attributes:
+ monotonic: Whether the input has all its integers in increasing order.
+ extra: A dict that can be used by the caller, e.g. to store info that's
+ only meaningful to caller.
+ """
def __init__(self, data=None):
self.monotonic = False
@@ -63,16 +70,18 @@
@classmethod
def parse(cls, text):
- """Parse a text string consisting of a space-separated list of
- blocks and ranges, eg "10-20 30 35-40". Ranges are interpreted to
- include both their ends (so the above example represents 18
- individual blocks. Returns a RangeSet object.
+ """Parses a text string into a RangeSet.
- If the input has all its blocks in increasing order, then returned
- RangeSet will have an extra attribute 'monotonic' that is set to
- True. For example the input "10-20 30" is monotonic, but the input
- "15-20 30 10-14" is not, even though they represent the same set
- of blocks (and the two RangeSets will compare equal with ==).
+ The input text string consists of a space-separated list of blocks and
+ ranges, e.g. "10-20 30 35-40". Ranges are interpreted to include both their
+ ends (so the above example represents 18 individual blocks). Returns a
+ RangeSet object.
+
+ If the input has all its blocks in increasing order, then the 'monotonic'
+ attribute of the returned RangeSet will be set to True. For example the
+ input "10-20 30" is monotonic, but the input "15-20 30 10-14" is not, even
+ though they represent the same set of blocks (and the two RangeSets will
+ compare equal with ==).
"""
return cls(text)