Skip to content

Commit e95bc7e

Browse files
author
ulan@chromium.org
committed
Merge experimental/a64 to bleeding_edge.
BUG=v8:3113 LOG=Y R=jochen@chromium.org, rmcilroy@chromium.org, rodolph.perfetta@arm.com Review URL: https://codereview.chromium.org/148293020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent a4ea700 commit e95bc7e

122 files changed

Lines changed: 70522 additions & 133 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ endif
223223

224224
# Architectures and modes to be compiled. Consider these to be internal
225225
# variables, don't override them (use the targets instead).
226-
ARCHES = ia32 x64 arm mipsel
226+
ARCHES = ia32 x64 arm a64 mipsel
227227
DEFAULT_ARCHES = ia32 x64 arm
228228
MODES = release debug optdebug
229229
DEFAULT_MODES = release debug
230-
ANDROID_ARCHES = android_ia32 android_arm android_mipsel
230+
ANDROID_ARCHES = android_ia32 android_arm android_a64 android_mipsel
231231
NACL_ARCHES = nacl_ia32 nacl_x64
232232

233233
# List of files that trigger Makefile regeneration:

Makefile.android

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
# Those definitions should be consistent with the main Makefile
29-
ANDROID_ARCHES = android_ia32 android_arm android_mipsel
29+
ANDROID_ARCHES = android_ia32 android_arm android_a64 android_mipsel
3030
MODES = release debug
3131

3232
# Generates all combinations of ANDROID ARCHES and MODES,
@@ -49,24 +49,40 @@ endif
4949
ifeq ($(ARCH), android_arm)
5050
DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm
5151
DEFINES += arm_neon=0 arm_version=7
52-
TOOLCHAIN_ARCH = arm-linux-androideabi-4.6
52+
TOOLCHAIN_ARCH = arm-linux-androideabi
53+
TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH)
54+
TOOLCHAIN_VER = 4.6
5355
else
54-
ifeq ($(ARCH), android_mipsel)
55-
DEFINES = target_arch=mipsel v8_target_arch=mipsel android_target_arch=mips
56-
DEFINES += mips_arch_variant=mips32r2
57-
TOOLCHAIN_ARCH = mipsel-linux-android-4.6
56+
ifeq ($(ARCH), android_a64)
57+
DEFINES = target_arch=a64 v8_target_arch=a64 android_target_arch=arm64
58+
TOOLCHAIN_ARCH = aarch64-linux-android
59+
TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH)
60+
TOOLCHAIN_VER = 4.8
5861
else
59-
ifeq ($(ARCH), android_ia32)
60-
DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86
61-
TOOLCHAIN_ARCH = x86-4.6
62+
ifeq ($(ARCH), android_mipsel)
63+
DEFINES = target_arch=mipsel v8_target_arch=mipsel
64+
DEFINES += android_target_arch=mips mips_arch_variant=mips32r2
65+
TOOLCHAIN_ARCH = mipsel-linux-android
66+
TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH)
67+
TOOLCHAIN_VER = 4.6
68+
6269
else
63-
$(error Target architecture "${ARCH}" is not supported)
70+
ifeq ($(ARCH), android_ia32)
71+
DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86
72+
TOOLCHAIN_ARCH = x86
73+
TOOLCHAIN_PREFIX = i686-linux-android
74+
TOOLCHAIN_VER = 4.6
75+
else
76+
$(error Target architecture "${ARCH}" is not supported)
77+
endif
6478
endif
6579
endif
6680
endif
6781

68-
TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt
82+
TOOLCHAIN_PATH = \
83+
${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}-${TOOLCHAIN_VER}/prebuilt
6984
ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}
85+
7086
ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),)
7187
$(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}". Please \
7288
check that ANDROID_NDK_ROOT and ANDROID_NDK_HOST_ARCH are set \
@@ -79,23 +95,23 @@ DEFINES += host_os=${HOST_OS}
7995
.SECONDEXPANSION:
8096
$(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$@
8197
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
82-
CXX="$(ANDROID_TOOLCHAIN)/bin/*-g++" \
83-
AR="$(ANDROID_TOOLCHAIN)/bin/*-ar" \
84-
RANLIB="$(ANDROID_TOOLCHAIN)/bin/*-ranlib" \
85-
CC="$(ANDROID_TOOLCHAIN)/bin/*-gcc" \
86-
LD="$(ANDROID_TOOLCHAIN)/bin/*-ld" \
87-
LINK="$(ANDROID_TOOLCHAIN)/bin/*-g++" \
88-
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
89-
python -c "print raw_input().capitalize()") \
90-
builddir="$(shell pwd)/$(OUTDIR)/$@"
98+
CXX="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-g++" \
99+
AR="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ar" \
100+
RANLIB="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ranlib" \
101+
CC="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-gcc" \
102+
LD="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ld" \
103+
LINK="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-g++" \
104+
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
105+
python -c "print raw_input().capitalize()") \
106+
builddir="$(shell pwd)/$(OUTDIR)/$@"
91107

92108
# Android GYP file generation targets.
93109
ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS))
94110
$(ANDROID_MAKEFILES):
95111
GYP_GENERATORS=make-android \
96112
GYP_DEFINES="${DEFINES}" \
97-
CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \
98-
CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \
113+
CC="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-gcc" \
114+
CXX="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-g++" \
99115
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \
100116
build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
101117
-Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \

build/android.gypi

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@
184184
'-L<(android_stlport_libs)/x86',
185185
],
186186
}],
187+
['target_arch=="a64"', {
188+
'ldflags': [
189+
'-L<(android_stlport_libs)/arm64',
190+
],
191+
}],
187192
],
188193
}],
189194
['target_arch=="ia32"', {
@@ -208,10 +213,19 @@
208213
],
209214
'target_conditions': [
210215
['_type=="executable"', {
216+
'conditions': [
217+
['target_arch=="a64"', {
218+
'ldflags': [
219+
'-Wl,-dynamic-linker,/system/bin/linker64',
220+
],
221+
}, {
222+
'ldflags': [
223+
'-Wl,-dynamic-linker,/system/bin/linker',
224+
],
225+
}]
226+
],
211227
'ldflags': [
212228
'-Bdynamic',
213-
'-Wl,-dynamic-linker,/system/bin/linker',
214-
'-Wl,--gc-sections',
215229
'-Wl,-z,nocopyreloc',
216230
# crtbegin_dynamic.o should be the last item in ldflags.
217231
'<(android_lib)/crtbegin_dynamic.o',

build/standalone.gypi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@
5252
# to gyp.
5353
'host_arch%':
5454
'<!(uname -m | sed -e "s/i.86/ia32/;\
55-
s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/mips.*/mipsel/")',
55+
s/x86_64/x64/;\
56+
s/amd64/x64/;\
57+
s/aarch64/a64/;\
58+
s/arm.*/arm/;\
59+
s/mips.*/mipsel/")',
5660
}, {
5761
# OS!="linux" and OS!="freebsd" and OS!="openbsd" and
5862
# OS!="netbsd" and OS!="mac"
@@ -97,6 +101,7 @@
97101

98102
'conditions': [
99103
['(v8_target_arch=="arm" and host_arch!="arm") or \
104+
(v8_target_arch=="a64" and host_arch!="a64") or \
100105
(v8_target_arch=="mipsel" and host_arch!="mipsel") or \
101106
(v8_target_arch=="x64" and host_arch!="x64") or \
102107
(OS=="android" or OS=="qnx")', {

build/toolchain.gypi

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@
268268
}], # _toolset=="target"
269269
],
270270
}], # v8_target_arch=="arm"
271+
['v8_target_arch=="a64"', {
272+
'defines': [
273+
'V8_TARGET_ARCH_A64',
274+
],
275+
}],
271276
['v8_target_arch=="ia32"', {
272277
'defines': [
273278
'V8_TARGET_ARCH_IA32',
@@ -407,7 +412,8 @@
407412
}],
408413
],
409414
}],
410-
['(OS=="linux") and (v8_target_arch=="x64")', {
415+
['(OS=="linux" or OS=="android") and \
416+
(v8_target_arch=="x64" or v8_target_arch=="a64")', {
411417
# Check whether the host compiler and target compiler support the
412418
# '-m64' option and set it if so.
413419
'target_conditions': [
@@ -513,7 +519,8 @@
513519
OS=="qnx"', {
514520
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
515521
'-Wnon-virtual-dtor', '-Woverloaded-virtual',
516-
'<(wno_array_bounds)' ],
522+
'<(wno_array_bounds)',
523+
],
517524
'conditions': [
518525
['v8_optimized_debug==0', {
519526
'cflags!': [

0 commit comments

Comments
 (0)