Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Add ARM64 support. Fixes facebook/buck#414#921

Closed
LegNeato wants to merge 3 commits into
facebook:masterfrom
LegNeato:arm64
Closed

Add ARM64 support. Fixes facebook/buck#414#921
LegNeato wants to merge 3 commits into
facebook:masterfrom
LegNeato:arm64

Conversation

@LegNeato

@LegNeato LegNeato commented Oct 5, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

By analyzing the blame information on this pull request, we identified @asp2insp, @andrewjcg and @alsutton to be potential reviewers.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Thank you for your pull request. As you may know, we require contributors to sign our Contributor License Agreement, and we don't seem to have you on file and listed as active anymore. In order for us to review and merge your code, please email cla@fb.com with your details so we can update your status.

@LegNeato

LegNeato commented Oct 5, 2016

Copy link
Copy Markdown
Contributor Author

I have signed the CLA. Seems to be a bug in the CLA tool (it's throwing an error). I'll email cla@fb.com.

@sdwilsh

sdwilsh commented Oct 5, 2016

Copy link
Copy Markdown
Contributor

There was a bug before where we never prompted former employees to sign the individual CLA. That bug has been fixed, but we don't have one of those on file for you. @caabernathy should be able to help you after you email :)

Additionally, the bot tells you to email because the form isn't going to work if you already have signed the CLA before (via an org or individually). Long story on why we haven't fixed that yet...

@leeight

leeight commented Oct 8, 2016

Copy link
Copy Markdown

react/react-native#2814

@LegNeato

LegNeato commented Oct 8, 2016

Copy link
Copy Markdown
Contributor Author

If no one cleans this up, adds tests, and adds the right flags I will try to do it next week.

@Coneko

Coneko commented Oct 11, 2016

Copy link
Copy Markdown

Thanks!

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@LegNeato

Copy link
Copy Markdown
Contributor Author

FYI, the CLA has now been signed manually. Still need to find time to fix this up a bit...

@leeight

leeight commented Oct 12, 2016

Copy link
Copy Markdown

@LegNeato build method signature changed, you need add more parameters.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@LegNeato

Copy link
Copy Markdown
Contributor Author

Rebased on latest changes.

Also, I removed arm64 from the list of default archs because currently the default platform is android-9, which doesn't have arm64. Happy to revisit that (either by adding it back in or adding it back in + bumping the default platform). Thoughts?

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@mkosiba

mkosiba commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

I'm a bit anxious about having no test coverage for this. Would it be possible to have an entry for this in

public void ndkCxxPlatforms() throws IOException {

?

I think not having arm64 in the default set is OK for now.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@LegNeato updated the pull request - view changes

@LegNeato

Copy link
Copy Markdown
Contributor Author

Travis failure is unrelated:

FAIL    <100ms  0 Passed   0 Skipped   1 Failed   //test/com/facebook/buck/android:integration
FAILURE //test/com/facebook/buck/android:integration main: //test/com/facebook/buck/android:integration failed with exit code 137:
junit
stderr: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0

com.facebook.buck.step.StepFailedException: //test/com/facebook/buck/android:integration failed with exit code 137:
junit
stderr: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0

    at com.facebook.buck.step.StepFailedException.createForFailingStepWithExitCode(StepFailedException.java:63)
    at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:65)
    at com.facebook.buck.step.DefaultStepRunner.lambda$0(DefaultStepRunner.java:84)
    at com.facebook.buck.step.DefaultStepRunner$$Lambda$246/748842359.call(Unknown Source)
    at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$0(WeightedListeningExecutorService.java:77)
    at com.facebook.buck.util.concurrent.WeightedListeningExecutorService$$Lambda$79/547201549.apply(Unknown Source)
    at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
    at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
    at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
    at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

@LegNeato

LegNeato commented Oct 22, 2016

Copy link
Copy Markdown
Contributor Author

Ok, I think we are ready to go here.

It doesn't feel really "nice" though. In order to build arm64 for android, you need to set the following in the [ndk] config section:

  • cpu_abis = arm64 -- because arm64 is not in the default arch set, mainly due to the app platform default being android-9
  • app_platform = android-21 -- because arm64 was not available before that, and again Buck's app_platform default isandroid-9

So to build arm64, your [ndk] section in .buckconfig needs to look like:

[ndk]
  # If you want all common ABIs. You could also do a subset.
  cpu_abis = armv7, arm64, x86, x86_64
  app_platform = android-21
  gcc_version = 4.9
  clang_version = 3.8

The last two lines shouldn't be needed as they should switch correctly (gcc, clang), but can't hurt...

Note that this is not just required for arm64...it is also an issue with x86_64 and to support that abi it needs to be configured the same way.

So the question is, is it better to have people make these changes, or is it better to have the default be these values and have the people needing to target older app platforms, compiler versions, and cpu_abis change their config?

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@marcinkosiba has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

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.

6 participants