aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-12-18 13:34:58 -0800
committerDan Albert <danalbert@google.com>2015-12-18 13:34:58 -0800
commit3a2e7b4189d02435f7bccc7b9468ce2065805245 (patch)
tree6bf0b665e0b68e8ad71775c7661332262a01b924
parentaccbb50614953a211c8f6290fb3c2c7ab4c29a58 (diff)
downloadndk-3a2e7b4189d02435f7bccc7b9468ce2065805245.tar.gz
Remove case insensitive duplicates from platforms.
Bug: http://b/26237865 Change-Id: Ib99306e2372d9fb256ac7cae44e1029aac196a99
-rwxr-xr-xbuild/tools/build-platforms.py3
-rwxr-xr-xbuild/tools/gen-platforms.sh9
2 files changed, 12 insertions, 0 deletions
diff --git a/build/tools/build-platforms.py b/build/tools/build-platforms.py
index 4b3c7b246..0695541f5 100755
--- a/build/tools/build-platforms.py
+++ b/build/tools/build-platforms.py
@@ -46,6 +46,9 @@ def main(args):
'bash', 'gen-platforms.sh', '--fast-copy', arch_arg, ndk_dir_arg,
]
+ if args.host != 'linux':
+ build_cmd.append('--case-insensitive')
+
build_support.build(build_cmd, args)
if __name__ == '__main__':
diff --git a/build/tools/gen-platforms.sh b/build/tools/gen-platforms.sh
index 31278ccc2..8bba2529f 100755
--- a/build/tools/gen-platforms.sh
+++ b/build/tools/gen-platforms.sh
@@ -76,6 +76,7 @@ OPTION_DEBUG_LIBS=
OPTION_OVERLAY=
OPTION_GCC_VERSION="default"
OPTION_LLVM_VERSION=$DEFAULT_LLVM_VERSION
+OPTION_CASE_INSENSITIVE=no
PACKAGE_DIR=
VERBOSE=no
@@ -127,6 +128,9 @@ for opt do
--llvm-version=*)
OPTION_LLVM_VERSION=$optarg
;;
+ --case-insensitive)
+ OPTION_CASE_INSENSITIVE=yes
+ ;;
*)
echo "unknown option '$opt', use --help"
exit 1
@@ -804,6 +808,11 @@ for ARCH in $ARCHS; do
done
if [ "$PACKAGE_DIR" ]; then
+ # Remove "duplicate" files for case-insensitive platforms.
+ if [ "$OPTION_CASE_INSENSITIVE" = "yes" ]; then
+ find "$DSTDIR/platforms" | sort -f | uniq -di | xargs rm
+ fi
+
for PLATFORM in $PLATFORMS; do
PLATFORM_NAME="android-$PLATFORM"
make_repo_prop "$DSTDIR/platforms/$PLATFORM_NAME"