Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit ee6e7e3

Browse files
committed
Add x86_64 support
1 parent ff41feb commit ee6e7e3

3 files changed

Lines changed: 23 additions & 16 deletions

File tree

.buckconfig

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[buildfile]
22
includes = //BUILD_DEFS
33
[ndk]
4-
ndk_version = r10c
4+
ndk_version = r10e
5+
cpu_abis = armv7, x86, x86_64
6+
gcc_version = 4.9
7+
app_platform = android-21
58
cppflags = \
69
-std=gnu11 \
710
-Wall \
@@ -88,6 +91,18 @@
8891
-mfloat-abi=softfp \
8992
-mthumb \
9093
-Os
94+
x86_64_cppflags = \
95+
-O2
96+
x86_64_cflags = \
97+
-funswitch-loops \
98+
-finline-limit=300 \
99+
-O2
100+
x86_64_cxxppflags = \
101+
-O2
102+
x86_64_cxxflags = \
103+
-funswitch-loops \
104+
-finline-limit=300 \
105+
-O2
91106
x86_cppflags = \
92107
-O2
93108
x86_cflags = \

jsc/BUCK

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44

5-
SUPPORTED_PLATFORMS = '^android-(armv7|x86)$'
5+
SUPPORTED_PLATFORMS = '^android-(armv7|x86|x86_64)$'
66

77
def unpack_rule(source, from_rule):
88
genrule(
@@ -26,19 +26,6 @@ WTF_EXPORTED_PREPROCESSOR_FLAGS = [
2626
'-DENABLE_GLOBAL_FASTMALLOC_NEW=0',
2727
]
2828

29-
# Dirty hack, StdLibExtras.h assumes incorrectly that is_trivially_destructible
30-
# have been added in 4.8.1 version while it was added in 4.8.0. We emulate PATCH
31-
# version to be 1 so that StdLibExtra.h doesn't try to declare
32-
# is_trivially_destructible
33-
# Except from this single place JSC code doesn't check for 4.8.1 anywhere else
34-
WTF_EXPORTED_PREPROCESSOR_FLAGS.extend([
35-
'-U__GNUC_PATCHLEVEL__',
36-
'-D__GNUC_PATCHLEVEL__=1',
37-
'-DPTHREAD_KEYS_MAX=1024',
38-
'-DINTPTR_MAX=LONG_MAX',
39-
'-Dlog2(x)=(log(x)/log(2.0))',
40-
])
41-
4229
cxx_library(
4330
name = 'wtfassertions',
4431
force_static = True,
@@ -165,6 +152,7 @@ cxx_library(
165152
supported_platforms_regex = SUPPORTED_PLATFORMS,
166153
header_namespace = '',
167154
headers = subdir_glob([
155+
('WTF', '*.h'),
168156
('WTF/wtf', '*.h'),
169157
('', 'extra_headers/*.h'),
170158
]),
@@ -936,7 +924,7 @@ SOURCES = glob([
936924
'JavaScriptCore/*.asm',
937925
])
938926
SOURCES.append(':InitBytecodes.asm')
939-
for platform in ('android-armv7', 'android-x86'):
927+
for platform in ('android-armv7', 'android-x86', 'android-x86_64'):
940928
source = 'LLIntAssembly.{0}.h'.format(platform)
941929
genrule(
942930
name = source,

jsc/extra_headers/LLIntAssembly.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include "LLIntAssembly.android-armv7.h"
55
#elif defined(__ANDROID__) && defined(__i386__)
66
#include "LLIntAssembly.android-x86.h"
7+
#elif defined(__ANDROID__) && defined(__x86_64__)
8+
#include "LLIntAssembly.android-x86_64.h"
9+
#elif defined(__ANDROID__) && defined(__aarch64__)
10+
#include "LLIntAssembly.android-arm64.h"
711
#else
812
#error "Platform not supported"
913
#endif

0 commit comments

Comments
 (0)