gecko-dev/servo/support
Lars Bergstrom 0b806539c8 servo: Merge #8288 - New Android suppport (from larsbergstrom:new_android_build); r=mbrubeck
r/f? @mbrubeck

No need to r+ urgently; I want to do a little bit more testing of the release build, but I'm hoping to land this bit (moving to a more sane build process) next week.

The new version of building an APK:
1) Removes the glutin-based APK builder from the link step
2) Adds a build.rs step to the build of the final Servo library that adds the native code required by glutin's android_rs_glue (e.g., `ANativeActivity_onCreate` definition)
3) Replaces the link step with a `fake-ld.sh` script that instead creates a libservo.so
4) Adds a new mach `package` step to build the APK that has some Rust code that builds the library from a set of in-tree build files

This setup fixes a number of problems:
1) We can use gdb, because we use `ndk-build`, which adds the .gdbserver info, plus we keep around all of the build files (also required by the ndk gdb)
2) We can add more Java code & hooks to handle Android intents
3) We no longer have any git submodules or the awkward two-step build with android-rs-glue

Many other setups were tried (and failed). The most obvious ones is building a libservo.so from a `dylib` target from the servo build on Android. This doesn't work because you can't have a different default lib target on one platform than others in Cargo, and you also can't pass it in from the commandline (e.g., --lib does not have a dylib arg). Additionally, if you don't go through the intermediate libservo.rlib step (which removes unused symbols), then you end up with a TON of missing symbols because our -sys crates are super sloppy about that. I spent a few weeks beginning to clean them up, but since it's something we can't easily enforce (and new -sys packages will have this problem, too, since it's only an issue with the Android loader), it made more sense to me to just have the build set up to discard those unused bits of code before they ever get to the linker, much less the loader.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0699d38e80c029a384354da96596421f3a97ceef
2015-11-05 05:22:48 +05:01
..
android servo: Merge #8288 - New Android suppport (from larsbergstrom:new_android_build); r=mbrubeck 2015-11-05 05:22:48 +05:01
rust-task_info servo: Merge #6591 - Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) (from servo:rustup_2015-07-10); r=larsbergstrom 2015-07-14 13:40:22 -06:00