Revert "Revert "Remove host tag from path in prebuilt/.""
Previous issue was that I had forgotten to upload
https://android-review.googlesource.com/#/c/180253/
This reverts commit 6a3516c0d91396e062915019c1b7959f359d49b4.
Change-Id: I7734954c84f7eb4343a5e74984c419717eb53fa6
diff --git a/build/core/init.mk b/build/core/init.mk
index d67160c..8130d81 100644
--- a/build/core/init.mk
+++ b/build/core/init.mk
@@ -302,7 +302,7 @@
$(call ndk_log,HOST_TAG set to $(HOST_TAG))
# Check for NDK-specific versions of our host tools
-HOST_PREBUILT_ROOT := $(NDK_ROOT)/prebuilt/$(HOST_TAG64)
+HOST_PREBUILT_ROOT := $(NDK_ROOT)/prebuilt
HOST_PREBUILT := $(strip $(wildcard $(HOST_PREBUILT_ROOT)/bin))
HOST_AWK := $(strip $(NDK_HOST_AWK))
HOST_MAKE := $(strip $(NDK_HOST_MAKE))
diff --git a/build/tools/common-build-host-funcs.sh b/build/tools/common-build-host-funcs.sh
index eafe644..10515bd 100644
--- a/build/tools/common-build-host-funcs.sh
+++ b/build/tools/common-build-host-funcs.sh
@@ -795,21 +795,6 @@
fail_panic
}
-# Return host tag with only translation that windows-x86 -> windows
-#
-# $1: host system tag
-install_dir_from_host_tag ()
-{
- case $1 in
- windows-x86)
- echo "windows"
- ;;
- *)
- echo "$1"
- ;;
- esac
-}
-
# Return the build install directory of a given Python version
#
# $1: host system tag
@@ -820,7 +805,7 @@
# python_ndk_install_dir with nothing.
python_build_install_dir ()
{
- echo "$BH_BUILD_DIR/install/prebuilt/$(install_dir_from_host_tag $1)"
+ echo "$BH_BUILD_DIR/install/prebuilt"
}
# Same as python_build_install_dir, but for the final NDK installation
@@ -829,5 +814,5 @@
# $1: host system tag
python_ndk_install_dir ()
{
- echo "prebuilt/$(install_dir_from_host_tag $1)"
+ echo "prebuilt"
}
diff --git a/build/tools/package-release.sh b/build/tools/package-release.sh
index 747fc3a..f8912ae 100755
--- a/build/tools/package-release.sh
+++ b/build/tools/package-release.sh
@@ -484,15 +484,15 @@
find "$DSTDIR/toolchains" -name a.out.h | grep include-fixed/ | xargs rm
# Remove redundant pretty-printers/libstdcxx
- rm -rf $DSTDIR/prebuilt/*/share/pretty-printers/libstdcxx/gcc-l*
- rm -rf $DSTDIR/prebuilt/*/share/pretty-printers/libstdcxx/gcc-4.9-*
+ rm -rf $DSTDIR/prebuilt/share/pretty-printers/libstdcxx/gcc-l*
+ rm -rf $DSTDIR/prebuilt/share/pretty-printers/libstdcxx/gcc-4.9-*
# Remove python tests
- find $DSTDIR/prebuilt/*/lib/python* -name test -exec rm -rf {} \;
+ find $DSTDIR/prebuilt/lib/python* -name test -exec rm -rf {} \;
# Remove python *.pyc and *.pyo files
- find $DSTDIR/prebuilt/*/lib/python* -name "*.pyc" -exec rm -rf {} \;
- find $DSTDIR/prebuilt/*/lib/python* -name "*.pyo" -exec rm -rf {} \;
+ find $DSTDIR/prebuilt/lib/python* -name "*.pyc" -exec rm -rf {} \;
+ find $DSTDIR/prebuilt/lib/python* -name "*.pyo" -exec rm -rf {} \;
# Remove .git*
find $DSTDIR -name ".git*" -exec rm -rf {} \;
diff --git a/build/tools/prebuilt-common.sh b/build/tools/prebuilt-common.sh
index ef6c03c..69c5c98 100644
--- a/build/tools/prebuilt-common.sh
+++ b/build/tools/prebuilt-common.sh
@@ -1424,27 +1424,22 @@
# Return the relative install prefix for prebuilt host
# executables (relative to the NDK top directory).
-# NOTE: This deals with MINGW==yes or DARWIN==yes appropriately
#
-# $1: optional, system name
# Out: relative path to prebuilt install prefix
get_prebuilt_install_prefix ()
{
- local TAG=${1:-$(get_prebuilt_host_tag)}
- echo "prebuilt/$TAG"
+ echo "prebuilt"
}
# Return the relative path of an installed prebuilt host
-# executable
-# NOTE: This deals with MINGW==yes or DARWIN==yes appropriately.
+# executable.
#
# $1: executable name
-# $2: optional, host system name
# Out: path to prebuilt host executable, relative
get_prebuilt_host_exec ()
{
local PREFIX EXE
- PREFIX=$(get_prebuilt_install_prefix $2)
+ PREFIX=$(get_prebuilt_install_prefix)
EXE=$(get_prebuilt_host_exe_ext)
echo "$PREFIX/bin/$1$EXE"
}
diff --git a/find-win-host.cmd b/find-win-host.cmd
deleted file mode 100755
index 83fa7a0..0000000
--- a/find-win-host.cmd
+++ /dev/null
@@ -1,31 +0,0 @@
-@echo off
-rem This is a Windows cmd.exe script used to find windows host name.
-rem %1 is the env. var to set to the windows host name.
-
-setlocal
-set NDK_ROOT=%~dp0
-
-rem Check if %NDK_ROOT% contains any spaces
-goto :L
-:FOO
- if "%2"=="" goto:EOF
- echo ERROR: NDK path cannot contain any spaces!
- exit /b 1
-
-:L
-call :FOO %NDK_ROOT%
-if ERRORLEVEL 1 exit /b 1
-
-set TEMP=windows-x86_64
-
-rem Check if NDK_HOST_32BIT is not set to 1/true, Windows is 64-bit, and 64-bit make exists
-if not exist "%NDK_ROOT%prebuilt\%TEMP%" set TEMP=
-if "%ProgramW6432%"=="" if "%ProgramFiles(x86)%"=="" set TEMP=
-
-rem Otherwise fall back to 32-bit make
-if "%TEMP%"=="" set TEMP=windows
-
-rem Uses "endlocal &&" hack to allow env. vars to survive setlocal/endlocal
-endlocal && set "%1=%TEMP%"
-
-exit /b 0
diff --git a/ndk-build.cmd b/ndk-build.cmd
index 9812279..788a42d 100755
--- a/ndk-build.cmd
+++ b/ndk-build.cmd
@@ -1,6 +1,3 @@
@echo off
-rem This is a Windows cmd.exe script used to invoke the NDK-specific GNU Make executable
-call "%~dp0find-win-host.cmd" NDK_WIN_HOST
-if ERRORLEVEL 1 (exit /b 1)
set NDK_ROOT=%~dp0
-"%NDK_ROOT%prebuilt/%NDK_WIN_HOST%/bin/make.exe" -f "%NDK_ROOT%build/core/build-local.mk" SHELL=cmd %*
+"%NDK_ROOT%prebuilt/bin/make.exe" -f "%NDK_ROOT%build/core/build-local.mk" SHELL=cmd %*
diff --git a/ndk-gdb-py.cmd b/ndk-gdb-py.cmd
index 265ca55..4c5d851 100755
--- a/ndk-gdb-py.cmd
+++ b/ndk-gdb-py.cmd
@@ -1,9 +1,6 @@
@echo off
-rem This is a Windows cmd.exe script used to invoke the NDK-specific Python executable
-call "%~dp0find-win-host.cmd" NDK_WIN_HOST
-if ERRORLEVEL 1 (exit /b 1)
setlocal
set NDK_ROOT=%~dp0
set SHELL=cmd
-"%NDK_ROOT%prebuilt/%NDK_WIN_HOST%/bin/python.exe" -u "%~dp0ndk-gdb.py" %*
+"%NDK_ROOT%prebuilt/bin/python.exe" -u "%~dp0ndk-gdb.py" %*
endlocal