summaryrefslogtreecommitdiff
path: root/build_tools-aarch64-host.patch
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools-aarch64-host.patch')
-rw-r--r--build_tools-aarch64-host.patch115
1 files changed, 0 insertions, 115 deletions
diff --git a/build_tools-aarch64-host.patch b/build_tools-aarch64-host.patch
index 256970e..6593217 100644
--- a/build_tools-aarch64-host.patch
+++ b/build_tools-aarch64-host.patch
@@ -1,118 +1,3 @@
-diff --git a/core/config.mk b/core/config.mk
-index 5ff582a13..7ff3b368f 100644
---- a/core/config.mk
-+++ b/core/config.mk
-@@ -383,7 +383,7 @@ ifeq (,$(filter 1 true,$(WITH_TIDY_ONLY)))
- endif
-
- PATH_TO_CLANG_TIDY := \
-- $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/bin/clang-tidy
-+ $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/$(LLVM_PREBUILTS_VERSION)/bin/clang-tidy
- ifeq ($(wildcard $(PATH_TO_CLANG_TIDY)),)
- ifneq (,$(filter 1 true,$(WITH_TIDY)))
- $(warning *** Disable WITH_TIDY because $(PATH_TO_CLANG_TIDY) does not exist)
-diff --git a/core/envsetup.mk b/core/envsetup.mk
-index 43593e63c..acf755f15 100644
---- a/core/envsetup.mk
-+++ b/core/envsetup.mk
-@@ -116,13 +116,15 @@ HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
- BUILD_OS := $(HOST_OS)
-
- HOST_CROSS_OS :=
--# We can cross-build Windows binaries on Linux
-+# We can cross-build Windows binaries on x86 Linux
- ifeq ($(HOST_OS),linux)
-+ifeq ($(HOST_ARCH),x86)
- HOST_CROSS_OS := windows
- HOST_CROSS_ARCH := x86
- HOST_CROSS_2ND_ARCH := x86_64
- 2ND_HOST_CROSS_IS_64_BIT := true
- endif
-+endif
-
- ifeq ($(HOST_OS),)
- $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!)
-@@ -134,10 +136,15 @@ ifneq (,$(findstring x86_64,$(UNAME)))
- HOST_2ND_ARCH := x86
- HOST_IS_64_BIT := true
- else
-+ifneq (,$(findstring aarch64,$(UNAME)))
-+ HOST_ARCH := arm64
-+ HOST_IS_64_BIT := true
-+else
- ifneq (,$(findstring i686,$(UNAME))$(findstring x86,$(UNAME)))
- $(error Building on a 32-bit x86 host is not supported: $(UNAME)!)
- endif
- endif
-+endif
-
- BUILD_ARCH := $(HOST_ARCH)
- BUILD_2ND_ARCH := $(HOST_2ND_ARCH)
-@@ -157,8 +164,12 @@ $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)
- endif
- endif
-
-+ifneq (,$(findstring x86_64,$(UNAME)))
- # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir.
- HOST_PREBUILT_ARCH := x86
-+else
-+HOST_PREBUILT_ARCH := $(HOST_ARCH)
-+endif
- # This is the standard way to name a directory containing prebuilt host
- # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc
- HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH)
-diff --git a/core/main.mk b/core/main.mk
-index bc4ed0421..34e87f6ec 100644
---- a/core/main.mk
-+++ b/core/main.mk
-@@ -14,6 +14,12 @@ ifndef KATI
- host_prebuilts := linux-x86
- ifeq ($(shell uname),Darwin)
- host_prebuilts := darwin-x86
-+else
-+ifeq (aarch64,$(shell uname -m))
-+host_prebuilts := linux-arm64
-+else
-+ $(error not arm64)
-+endif
- endif
-
- .PHONY: run_soong_ui
-diff --git a/core/soong_config.mk b/core/soong_config.mk
-index e21083d7c..09d4b5814 100644
---- a/core/soong_config.mk
-+++ b/core/soong_config.mk
-@@ -71,11 +71,11 @@ $(SOONG_VARIABLES): FORCE
- echo ' "DeviceSecondaryAbi": ["$(TARGET_2ND_CPU_ABI)", "$(TARGET_2ND_CPU_ABI2)"],'; \
- echo ''; \
- echo ' "HostArch": "$(HOST_ARCH)",'; \
-- echo ' "HostSecondaryArch": "$(HOST_2ND_ARCH)",'; \
-+ test $(shell uname -m) = aarch64 || echo ' "HostSecondaryArch": "$(HOST_2ND_ARCH)",'; \
- echo ''; \
-- echo ' "CrossHost": "$(HOST_CROSS_OS)",'; \
-- echo ' "CrossHostArch": "$(HOST_CROSS_ARCH)",'; \
-- echo ' "CrossHostSecondaryArch": "$(HOST_CROSS_2ND_ARCH)",'; \
-+ test $(shell uname -m) = aarch64 || echo ' "CrossHost": "$(HOST_CROSS_OS)",'; \
-+ test $(shell uname -m) = aarch64 || echo ' "CrossHostArch": "$(HOST_CROSS_ARCH)",'; \
-+ test $(shell uname -m) = aarch64 || echo ' "CrossHostSecondaryArch": "$(HOST_CROSS_2ND_ARCH)",'; \
- echo ' "Safestack": $(if $(filter true,$(USE_SAFESTACK)),true,false),'; \
- echo ' "EnableCFI": $(if $(filter false,$(ENABLE_CFI)),false,true),'; \
- echo ' "Device_uses_hwc2": $(if $(filter true,$(TARGET_USES_HWC2)),true,false),'; \
-diff --git a/envsetup.sh b/envsetup.sh
-index b71a8256a..aa400e4c7 100644
---- a/envsetup.sh
-+++ b/envsetup.sh
-@@ -728,7 +728,9 @@ function getdriver()
- # c++-analyzer and ccc-analyzer.
- local CLANG_VERSION=$(get_build_var LLVM_PREBUILTS_VERSION)
- local BUILD_OS=$(get_build_var BUILD_OS)
-- local CLANG_DIR="$T/prebuilts/clang/host/${BUILD_OS}-x86/${CLANG_VERSION}"
-+ local BUILD_ARCH="x86"
-+ test $(uname -m) = "aarch64" && BUILD_ARCH=arm64
-+ local CLANG_DIR="$T/prebuilts/clang/host/${BUILD_OS}-${BUILD_ARCH}/${CLANG_VERSION}"
- echo "\
- ${CLANG_DIR}/tools/scan-build/bin/scan-build \
- --use-analyzer ${CLANG_DIR}/bin/clang \
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 652fadf56..17d851b3c 100644
--- a/tools/releasetools/common.py