[PATCH] [libcxx] Add support for Android targets to lit.cfg.

Dan Albert danalbert at google.com
Fri Jul 18 17:03:05 PDT 2014


Hi mclow.lists,

For accurate testing on Android, test compilation needs to more closely match the Android build system. This means flipping all the switches for -nostdlibinc, -nostdlib, etc. and instead using the libraries that were either prebuilt or built by the system.

Android's build system isn't able to efficiently handle many small builds run concurrently. The downside of this is that directly using the Android build system to compile each test cannot be done in parallel, and would take roughly 7 hours to complete a test run.

To deal with this, when config.android is true, lit.cfg will pull all of the cppflags and ldflags right out of config instead of trying to determine them on its own. It's dirtied a little bit by crtbegin and crtend.

The other thing this patch does is deal with pushing the built test to the android device, running it on the device, and removing it when done. There are a few intricacies wrapped around `adb shell`, as adb considers all commands that were able to be run on the device, regardless of their exit codes, to be successful. As such, the commands are run as `adb shell COMMAND; echo $?`, and the last line of stdout is read to determine the real exit status.

http://reviews.llvm.org/D4594

Files:
  test/lit.cfg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4594.11676.patch
Type: text/x-patch
Size: 18848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140719/e9fcb35a/attachment.bin>


More information about the cfe-commits mailing list