Update dir names to match prebuilts.
Changed the output directories to match those used in prebuilts (and
by extension, upload-toolchain and download-toolchain).
Change-Id: Id91adb6fef7ad381edc3e4e937e1d1adfd04e36d
diff --git a/do-build b/do-build
index ab02aff..e26ae1a 100755
--- a/do-build
+++ b/do-build
@@ -409,15 +409,26 @@
fi
}
+# Determine where the tools will be installed.
get_install_dir()
{
+ canonicalize_target_name "$TARGET"
+ local normalized_target="$RESULT"
+
get_component_attribute "gcc" "VER"
local gcc_ver="$RESULT"
+
if [ "$HOST" == "$TARGET" ]
then
- RESULT="$OUT_DIR/gcc-${gcc_ver}_${HOST}"
+ RESULT="$OUT_DIR/$normalized_target-$gcc_ver-native"
else
- RESULT="$OUT_DIR/gcc-${gcc_ver}_${HOST}_to_${TARGET}"
+ canonicalize_target_name "$HOST"
+ local normalized_host="$RESULT"
+ split_arch_os "$normalized_host"
+ local normalized_host_arch="$RESULT_ARCH"
+ # The output dir has an uppercase OS name.
+ local normalized_host_os="$(echo ${RESULT_OS:0:1} | tr '[:lower:]' '[:upper:]')${RESULT_OS:1}"
+ RESULT="$OUT_DIR/$normalized_target-$gcc_ver-$normalized_host_os-$normalized_host_arch"
fi
}