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