Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only specify the Android ABI to CMake that Gradle is already building #41

Open
ryantrem opened this issue Jun 30, 2020 · 2 comments
Open
Labels
Milestone

Comments

@ryantrem
Copy link
Member

Currently, when you build a specific ABI for Android, we still tell CMake to build all the ABIs we support. This makes the build three times slower than it needs to be when you first build for a specific target ABI. This should be configured in Apps/Playground/node_modules/@babylonjs/react-native/android/build.gradle. An example of what I believe to be the correct way to configure this can be found here: https://stackoverflow.com/questions/55479984/pass-architecture-information-from-gradlew-command-to-cmake/55486008#55486008

@thomlucc thomlucc added the 6.0 label Sep 23, 2022
@thomlucc thomlucc added this to the 6.0 milestone Sep 23, 2022
@thomlucc thomlucc removed the 6.0 label Sep 23, 2022
@thomlucc thomlucc modified the milestones: 6.0, Future Nov 17, 2022
@bghgary bghgary modified the milestones: Future, 7.0 Jun 15, 2023
@CedricGuillemet
Copy link
Contributor

CedricGuillemet commented Jul 27, 2023

I need a bit of clarification here. In BN CI, a parameter has been added to only build arm64
https://github.com/BabylonJS/BabylonNative/blob/88d09c881d81d0ae4889098c2aa9da53e0d929db/.github/jobs/android.yml#L32
For BRN, we can do the same but it needs some modification in gulp.js to deduce or forward the ABI parameter.
And when using npm run android command, I'm not sure it can deduce the type of ABI needed when starting the build process (emulator or arm64 connected phone)
So, to sumarize it, what are the use cases for limiting the ABIs built?
Does it make sense to have prebuilt binaries for some BN libraries instead?

@ryantrem
Copy link
Member Author

This issue is pretty old, but I believe the primary intent here was just to improve the dev inner loop (specifically local builds from Android Studio). I think my expectation would be:

  • Building from Android Studio: respect the currently selected cpu architecture
  • Building via npm command: build all ABIs, or maybe require a new argument to select an ABI if we thought that would be useful
  • Building via gulp / build pipeline: build all ABIs

So I think really this issue is just about the first bullet, and I think the stack overflow solution linked above achieves that (use the project ABI is specified, otherwise fall back to all ABIs).

@thomlucc thomlucc modified the milestones: 7.0, 8.0 Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants