[PATCH] D29050: [zorg] Add AOSP builder

Stephen Hines via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 16:05:29 PST 2017


srhines added a comment.

In https://reviews.llvm.org/D29050#656626, @pzheng wrote:

> In https://reviews.llvm.org/D29050#655922, @srhines wrote:
>
> > Are you sure that you want to always be syncing AOSP? There is a good chance that the AOSP build could break for reasons beyond the control of the LLVM community. It might be better to pick a particular AOSP release to minimize those kinds of issues. One other potential problem is going to be the increasing presence of stricter warnings/errors from Clang. These can also cause issues with AOSP.
>
>
> Thanks for bringing this up. These are indeed valid concerns. Can you please suggest an AOSP release for use with this buildbot?


http://source.android.com/source/build-numbers.html#source-code-tags-and-builds is the list of branches. So for angler, you could do the repo init with "-b android-7.1.1_r11". I only suggest this so that you don't have 2 moving targets (i.e. Clang/LLVM sources can break or be buggy, and AOSP sources can break or be buggy). There is definitely also value in having both be tested simultaneously, but I wouldn't want people to be spuriously notified when the failures are not necessarily related to the code they submitted.



================
Comment at: zorg/buildbot/builders/AOSPBuilder.py:101
+    if target_clang:
+        command += " TARGET_CLANG=%s" % target_clang
+    if target_flags:
----------------
pzheng wrote:
> srhines wrote:
> > You can switch from TARGET_CLANG to LLVM_PREBUILTS_BASE along with LLVM_PREBUILTS_VERSION. You might also need to set/adjust LLVM_RELEASE_VERSION (currently 4.0, but obviously upstream will move past that).
> Thanks for your suggestion. Have a couple of questions.
> 1) TARGET_CLANG only switches the Clang used for target build. Host build still uses the AOSP's default Clang. Can I have the same effect by using LLVM_PREBUILTS_BASE & LLVM_RELEASE_VERSION?
> 2) Can you please give an example of how to use LLVM_PREBUILTS_BASE & LLVM_RELEASE_VERSION to switch the Clang for build AOSP? Let's assume the Clang we want to switch to is located at /local/aosp/llvm.inst/bin/clang(++).
1. I don't think it is wise to mix/match the Clang's used for the host and the target. Why not build the host components using the new Clang as well? We don't offer the ability to switch these independently in Android either, so this is just a weird configuration.

2. The Android build system expects the BUILD_OS to be present as well, so you ideally should transform the installation path of your tools to include a "linux-x86" or "darwin-x86" component. In general, the paths are used like this:

$(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/bin/clang(++)

So, let's say we update your path to look more like:
/local/aosp/linux-x86/llvm.inst/bin/clang(++)

LLVM_PREBUILTS_BASE=/local/aosp/
LLVM_PREBUILTS_VERSION=llvm.inst/
LLVM_RELEASE_VERSION=4.0 # This has to change when LLVM upstream changes their numbering too.

You can pass those env vars to the build command directly for AOSP, and it should use your new compiler for all host/device compilation.


https://reviews.llvm.org/D29050





More information about the llvm-commits mailing list