blob: 8f25f30ae705169fe65408831c999c4f2922c54f [file] [log] [blame] [view]
Pirama Arumuga Nainar87d948e2016-03-03 15:49:35 -08001Updating RenderScript
2=====================
3
Stephen Hines1687f752016-04-12 18:56:27 -07004For 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 Nainar87d948e2016-03-03 15:49:35 -08007Updating LLVM Libraries
8-----------------------
9
10Loop over llvm, clang, compiler-rt (in this order):
11
121. 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
202. Test everything before submitting the patch from the previous step.
21
223. 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
374. Clean up after our working branch.
38
39 git checkout --detach
40 git branch -D working_dev
41
42This works better because we can keep full history in *aosp/dev*, while
43maintaining easy reverts/commits through *aosp/master*.
44
45
46Generating New Prebuilts
47------------------------
48
Pirama Arumuga Nainar4570a352016-03-31 14:37:00 -0700491. 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.
522. Iteratively attempt to build the platform and fix any API differences in
Pirama Arumuga Nainar87d948e2016-03-03 15:49:35 -080053 frameworks/compile/slang, and/or frameworks/compile/libbcc. This may entail
54 updating the various snapshots of Bitcode Readers/Writers.
Pirama Arumuga Nainar4570a352016-03-31 14:37:00 -0700553. Update RenderScript prebuilts.
Pirama Arumuga Nainar87d948e2016-03-03 15:49:35 -080056
57 cd $ANDROID_BUILD_TOP/frameworks/rs
58 ./update_rs_prebuilts.sh
59
Pirama Arumuga Nainar4570a352016-03-31 14:37:00 -0700604. The prebuilts get copied to **prebuilts/sdk**, so we must upload the
Pirama Arumuga Nainar87d948e2016-03-03 15:49:35 -080061relevant bits from there.
62
63 cd $ANDROID_BUILD_TOP/prebuilts/sdk
64 git commit -a
65 repo upload .
66
Pirama Arumuga Nainar4570a352016-03-31 14:37:00 -0700675. Submit CLs.
Pirama Arumuga Nainar87d948e2016-03-03 15:49:35 -080068
69
70Testing Checklist
71-----------------
72
731. Go to **external/llvm** and run `./android_test.sh` (no known failures
74as of 2015-10-08).
752. Ensure successful build for all architectures: 32- and 64- bit ARM, x86 and
76Mips.
773. Run 32- and 64- bit RenderScript CTS at least for ARM and AArch64.
784. Test RenderScript apps: RsTest, ImageProcessing, and finally
79RSTest\_Compatlib in compatibility mode.
805. 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
82test.
83This ensures that the rebased BitcodeReader can read the output of old
84BitcodeWriters.
856. Test new APKs on an old device: test freshly built APKs for
86RSTest\_V{11,14,16}, and ImageProcessing\_2 on an old device (say Manta) and
87ensure they pass.
88This ensures that the rebase did not break the 2.9 and 3.2 BitcodeWriters.
89
90
91Checklist for CLs
92-----------------
93
94The following projects will almost always have CLs as a part of the rebase.
95Depending on the changes in LLVM, there might be updates to other projects as
96well.
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**