Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 1 | Updating RenderScript |
| 2 | ===================== |
| 3 | |
Stephen Hines | 1687f75 | 2016-04-12 18:56:27 -0700 | [diff] [blame] | 4 | For the latest version of this doc, please make sure to visit: |
| 5 | [Android RenderScript Prebuilts Doc](https://android.googlesource.com/platform/external/clang/+/dev/RenderScriptPrebuilts.md) |
| 6 | |
Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 7 | Updating LLVM Libraries |
| 8 | ----------------------- |
| 9 | |
| 10 | Loop over llvm, clang, compiler-rt (in this order): |
| 11 | |
| 12 | 1. Do a squashed merge of *aosp/dev* to *aosp/master*. |
| 13 | |
| 14 | repo start update . |
| 15 | git fetch aosp dev |
| 16 | git merge --squash aosp/dev |
| 17 | git commit -a |
| 18 | repo upload . |
| 19 | |
| 20 | 2. Test everything before submitting the patch from the previous step. |
| 21 | |
| 22 | 3. Grab the squashed commit and replay it in *aosp/dev*. |
| 23 | |
| 24 | repo sync . |
| 25 | git remote update |
| 26 | git branch -D clean_master |
| 27 | git checkout -b clean_master aosp/master |
| 28 | git checkout working_dev |
| 29 | |
| 30 | Use `-s ours` to ensure that we skip the squashed set of changes. |
| 31 | If/when we forget this, we have to do it later. |
| 32 | |
| 33 | git merge -s ours clean_master |
| 34 | git push aosp refs/heads/working_dev:refs/heads/dev |
| 35 | git branch -D clean_master |
| 36 | |
| 37 | 4. Clean up after our working branch. |
| 38 | |
| 39 | git checkout --detach |
| 40 | git branch -D working_dev |
| 41 | |
| 42 | This works better because we can keep full history in *aosp/dev*, while |
| 43 | maintaining easy reverts/commits through *aosp/master*. |
| 44 | |
| 45 | |
| 46 | Generating New Prebuilts |
| 47 | ------------------------ |
| 48 | |
Pirama Arumuga Nainar | 4570a35 | 2016-03-31 14:37:00 -0700 | [diff] [blame] | 49 | 1. Set RS_LLVM_PREBUILTS_VERSION in build/core/clang/config.mk to the latest |
| 50 | prebuilts generated for this rebase, or to the latest platform version if no |
| 51 | new prebuilts were generated. |
| 52 | 2. Iteratively attempt to build the platform and fix any API differences in |
Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 53 | frameworks/compile/slang, and/or frameworks/compile/libbcc. This may entail |
| 54 | updating the various snapshots of Bitcode Readers/Writers. |
Pirama Arumuga Nainar | 4570a35 | 2016-03-31 14:37:00 -0700 | [diff] [blame] | 55 | 3. Update RenderScript prebuilts. |
Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 56 | |
| 57 | cd $ANDROID_BUILD_TOP/frameworks/rs |
| 58 | ./update_rs_prebuilts.sh |
| 59 | |
Pirama Arumuga Nainar | 4570a35 | 2016-03-31 14:37:00 -0700 | [diff] [blame] | 60 | 4. The prebuilts get copied to **prebuilts/sdk**, so we must upload the |
Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 61 | relevant bits from there. |
| 62 | |
| 63 | cd $ANDROID_BUILD_TOP/prebuilts/sdk |
| 64 | git commit -a |
| 65 | repo upload . |
| 66 | |
Pirama Arumuga Nainar | 4570a35 | 2016-03-31 14:37:00 -0700 | [diff] [blame] | 67 | 5. Submit CLs. |
Pirama Arumuga Nainar | 87d948e | 2016-03-03 15:49:35 -0800 | [diff] [blame] | 68 | |
| 69 | |
| 70 | Testing Checklist |
| 71 | ----------------- |
| 72 | |
| 73 | 1. Go to **external/llvm** and run `./android_test.sh` (no known failures |
| 74 | as of 2015-10-08). |
| 75 | 2. Ensure successful build for all architectures: 32- and 64- bit ARM, x86 and |
| 76 | Mips. |
| 77 | 3. Run 32- and 64- bit RenderScript CTS at least for ARM and AArch64. |
| 78 | 4. Test RenderScript apps: RsTest, ImageProcessing, and finally |
| 79 | RSTest\_Compatlib in compatibility mode. |
| 80 | 5. Test old APKs with rebased tools: grab the above apps from a different tree |
| 81 | (i.e. without the rebase), push them to a device with the rebased tools, and |
| 82 | test. |
| 83 | This ensures that the rebased BitcodeReader can read the output of old |
| 84 | BitcodeWriters. |
| 85 | 6. Test new APKs on an old device: test freshly built APKs for |
| 86 | RSTest\_V{11,14,16}, and ImageProcessing\_2 on an old device (say Manta) and |
| 87 | ensure they pass. |
| 88 | This ensures that the rebase did not break the 2.9 and 3.2 BitcodeWriters. |
| 89 | |
| 90 | |
| 91 | Checklist for CLs |
| 92 | ----------------- |
| 93 | |
| 94 | The following projects will almost always have CLs as a part of the rebase. |
| 95 | Depending on the changes in LLVM, there might be updates to other projects as |
| 96 | well. |
| 97 | |
| 98 | * External projects |
| 99 | |
| 100 | * **external/clang** |
| 101 | * **external/compiler-rt** |
| 102 | * **external/llvm** |
| 103 | * **frameworks/compile/mclinker** |
| 104 | |
| 105 | * RenderScript projects |
| 106 | |
| 107 | * **frameworks/compile/libbcc** |
| 108 | * **frameworks/compile/slang** |
| 109 | * **frameworks/rs** |
| 110 | |
| 111 | * Prebuilts |
| 112 | * **prebuilts/sdk** |
| 113 | |
| 114 | * CTS tests |
| 115 | |
| 116 | * **cts/tests/tests/renderscript** |
| 117 | * **cts/tests/tests/renderscriptlegacy** |
| 118 | * **cts/tests/tests/rscpp** |