Add basic Darwin+Arm64 support as HOST_CROSS
Soong will use this to turn on universal binary support (X86_64 + Arm64 in the same binary). Bug: 203607969 Test: m sdk-repo-platform-tools sdk-repo-build-tools on Mac Change-Id: I04612136a42e85f4add95202ce20e741d9aaa302
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Configuration for builds hosted on linux_arm-arm64
|
|
||||||
# Included by combo/select.mk
|
|
||||||
|
|
||||||
define $(combo_var_prefix)transform-shared-lib-to-toc
|
|
||||||
$(call _gen_toc_command_for_elf,$(1),$(2))
|
|
||||||
endef
|
|
@@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Settings to use MinGW as a cross-compiler under Linux
|
|
||||||
# Included by combo/select.make
|
|
||||||
|
|
||||||
define $(combo_var_prefix)transform-shared-lib-to-toc
|
|
||||||
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2)
|
|
||||||
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2)
|
|
||||||
endef
|
|
@@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Settings to use MinGW as a cross-compiler under Linux
|
|
||||||
# Included by combo/select.make
|
|
||||||
|
|
||||||
define $(combo_var_prefix)transform-shared-lib-to-toc
|
|
||||||
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2)
|
|
||||||
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2)
|
|
||||||
endef
|
|
@@ -27,6 +27,13 @@ combo_os_arch := $($(combo_target)OS)-$($(combo_target)$(combo_2nd_arch_prefix)A
|
|||||||
combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target)
|
combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target)
|
||||||
|
|
||||||
# Set reasonable defaults for the various variables
|
# Set reasonable defaults for the various variables
|
||||||
|
ifeq ($(combo_target),HOST_CROSS_)
|
||||||
|
$(KATI_obsolete_var \
|
||||||
|
$(combo_var_prefix)GLOBAL_ARFLAGS \
|
||||||
|
$(combo_var_prefix)STATIC_LIB_SUFFIX \
|
||||||
|
$(combo_var_prefix)transform-shared-lib-to-toc \
|
||||||
|
,HOST_CROSS builds are not supported in Make)
|
||||||
|
else
|
||||||
|
|
||||||
$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD -format=gnu
|
$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD -format=gnu
|
||||||
|
|
||||||
@@ -34,3 +41,5 @@ $(combo_var_prefix)STATIC_LIB_SUFFIX := .a
|
|||||||
|
|
||||||
# Now include the combo for this specific target.
|
# Now include the combo for this specific target.
|
||||||
include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
|
include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
|
||||||
|
|
||||||
|
endif
|
||||||
|
@@ -167,6 +167,10 @@ ifeq ($(HOST_OS),linux)
|
|||||||
else
|
else
|
||||||
$(error Unsupported HOST_CROSS_OS $(HOST_CROSS_OS))
|
$(error Unsupported HOST_CROSS_OS $(HOST_CROSS_OS))
|
||||||
endif
|
endif
|
||||||
|
else ifeq ($(HOST_OS),darwin)
|
||||||
|
HOST_CROSS_OS := darwin
|
||||||
|
HOST_CROSS_ARCH := arm64
|
||||||
|
HOST_CROSS_2ND_ARCH :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),)
|
ifeq ($(HOST_OS),)
|
||||||
|
Reference in New Issue
Block a user