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

Add x86_64 support #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add x86_64 support #19

wants to merge 2 commits into from

Conversation

leeight
Copy link

@leeight leeight commented Oct 7, 2016

Copy link
Contributor

@ide ide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have some questions, it's not clear to me just looking at the code what the answers are.

# version to be 1 so that StdLibExtra.h doesn't try to declare
# is_trivially_destructible
# Except from this single place JSC code doesn't check for 4.8.1 anywhere else
WTF_EXPORTED_PREPROCESSOR_FLAGS.extend([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this OK to remove now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc 4.9 is ok, gcc 4.8 need that patch.

ndk_version = r10e
cpu_abis = armv7, arm64, x86, x86_64
gcc_version = 4.9
app_platform = android-21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be 16 to support Android 4.1?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried different platforms, it looks like only android-21 can work, but i can figure out the reason.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK thanks, the JSC AAR file needs to work with API 16 since React Native supports API 16.

Copy link

@LegNeato LegNeato Oct 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably because android-21 was the first platform that contained the x86_64 and arm64 ndk ABI.

@@ -165,6 +152,7 @@ cxx_library(
supported_platforms_regex = SUPPORTED_PLATFORMS,
header_namespace = '',
headers = subdir_glob([
('WTF', '*.h'),
('WTF/wtf', '*.h'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encounter an error, missing "config.h"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsc/WTF/wtf/unicode/CollatorDefault.cpp:29:20: fatal error: config.h: No such file or directory
 #include "config.h"
                    ^
compilation terminated.

jsc/WTF/wtf/unicode/CollatorDefault.cpp:29:20: fatal error: config.h: No such file or directory
 #include "config.h"
                    ^
compilation terminated.

jsc/WTF/wtf/unicode/CollatorDefault.cpp:29:20: fatal error: config.h: No such file or directory
 #include "config.h"
                    ^
compilation terminated.

jsc/WTF/wtf/unicode/CollatorDefault.cpp:29:20: fatal error: config.h: No such file or directory
 #include "config.h"
                    ^
compilation terminated.

BUILD FAILED: //jsc:wtfcollation#android-x86,compile-pic-CollatorDefault.cpp.oe467649f failed with exit code 1:
c++ piped_preprocess_and_compile

@leeight
Copy link
Author

leeight commented Oct 10, 2016

This is the build output, but this PR depends on facebook/buck#921


   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
1985-02-01 00:00:00 .....          224          152  AndroidManifest.xml
1985-02-01 00:00:00 .....            0            2  R.txt
1985-02-01 00:00:00 D....            0            0  assets
1985-02-01 00:00:00 .....          293          136  classes.jar
1985-02-01 00:00:00 D....            0            0  jni
1985-02-01 00:00:00 D....            0            0  jni/arm64-v8a
1985-02-01 00:00:00 .....      1439272       548379  jni/arm64-v8a/libicu_common.so
1985-02-01 00:00:00 .....      3185640      1169618  jni/arm64-v8a/libjsc.so
1985-02-01 00:00:00 D....            0            0  jni/armeabi-v7a
1985-02-01 00:00:00 .....       931204       440769  jni/armeabi-v7a/libicu_common.so
1985-02-01 00:00:00 .....      1898652       938992  jni/armeabi-v7a/libjsc.so
1985-02-01 00:00:00 D....            0            0  jni/x86
1985-02-01 00:00:00 .....      1414424       580893  jni/x86/libicu_common.so
1985-02-01 00:00:00 .....      5081248      1828951  jni/x86/libjsc.so
1985-02-01 00:00:00 D....            0            0  jni/x86_64
1985-02-01 00:00:00 .....      1374064       542868  jni/x86_64/libicu_common.so
1985-02-01 00:00:00 .....      4849408      1749414  jni/x86_64/libjsc.so
1985-02-01 00:00:00 D....            0            0  res
------------------- ----- ------------ ------------  ------------------------
1985-02-01 00:00:00           20174429      7800174  11 files, 7 folders

@LegNeato
Copy link

LegNeato commented Feb 1, 2017

Is this ever going to get cleaned up and landed?

@LegNeato
Copy link

LegNeato commented Feb 1, 2017

(buck support for 64bit on Android has been in for months)

@ide
Copy link
Contributor

ide commented Feb 2, 2017

This looks good to me. I believe it's fine to bump the target Android version, which is separate from the minimum Android version, so we'll still maintain compatibility with 4.x.

@mkonicek Could you merge this?

@franzks-zz
Copy link

I'm trying to understand why React Native doesn't support arm64, and from reading the discussion on the RN issues post it seems this project is one of the dependencies, so until android-jsc officially supports arm64 support I guess RN won't be able to.

What else is blocking this PR from being merged?

@bootstraponline
Copy link

It'd be great to see this PR merged. The build scripts are broken on master.

@govi
Copy link

govi commented Dec 4, 2017

If there is any appetite to get this merged, I can raise a PR. The URL to download jsc sources is now broken, but we can still checkout the svn repo and get the same revision.

If there are other problems, it'd help us. We are seeing massive drop in performance for some use cases. If we are unable to support 64-bit sooner, it might make react-native a no-go for us.

@newyankeecodeshop
Copy link

@govi Have you tried the JavaScriptCore from this project? https://github.com/SoftwareMansion/jsc-android-buildscripts
We have been using it in a couple of RN apps on Android, and it's great having a modern, ES2015 JavaScript runtime.

@govi
Copy link

govi commented Jan 3, 2018

@newyankeecodeshop well, expo seemed to have rolled it back in their last release, due to some crashes in date functions. Prolly irrelevant to this ticket, but what is your experience with the new-jsc?

@newyankeecodeshop
Copy link

@govi We've been using it for several months on a new app running on Android 4.2-5.1 and haven't had any issues. We don't use the date toLocaleString function that caused issues. It's been great having the full runtime APIs similar to iOS 10, which is the iOS version we target.

@gengjiawen
Copy link

@ide anything we can do to push this foward ?

@ide
Copy link
Contributor

ide commented Jan 17, 2018

@gengjiawen The work was happening in this repo: https://github.com/SoftwareMansion/jsc-android-buildscripts. The one thing that comes to mind is testing the new JSC in a lot of conditions (different types of phones, different JS bundles).

@gengjiawen
Copy link

gengjiawen commented Jan 17, 2018

But currently android-jsc still use nightly build webkit before 2016-08-26 and have no test. My main concern is that keep javascripcore up to date will give us better performance and better support to modern js features. And also support more cpu will get react native widely adopted.

@ide
Copy link
Contributor

ide commented Jan 17, 2018

Work in this repo appears to have stopped -- the most recent work on JSC for RN Android was on this repo: https://github.com/SoftwareMansion/jsc-android-buildscripts. That's where work for new versions of JSC (ES2015, 64-bit) is happening.

That said, it seems fine to me to merge this PR and I'll talk to someone who works on the FB Open Source team to see if they can help.

@gengjiawen
Copy link

As far as I know, react native is still use this repo (https://github.com/facebook/react-native/blob/999851a3891b4c6ceffd37fa3a6bdb27c5b6159e/ReactAndroid/build.gradle#L291). And thanks for reaching out.

@AustinHunt
Copy link

When is this going to be added? Am I missing something?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants