commit | afd92a86891a46418d8b18d5caea78fadd2968eb | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Thu Oct 10 22:44:22 2019 -0700 |
committer | Tao Bao <tbao@google.com> | Fri Oct 11 08:53:41 2019 -0700 |
tree | 13f3cb7852ed666f4aa93cc0f556cdf4d409e96a | |
parent | 51a7d202297cb41f41caaa4595d209f8b93d651d [diff] |
releasetools: Set the search path based on the current executable. We used to mimic the behavior of build system, to find the default search path based on OUT_DIR_COMMON_BASE or OUT_DIR. These variables should be internal to build system. Since we've switched releasetools script to hermetic Python executables (e.g. `m -j ota_from_target_files`, then run the binary at `out/host/linux-x86/bin/ota_from_target_files`), we can set the search path in relative to the path of the current executable. Bug: 133126366 Test: TreeHugger Test: 1. Build aosp_x86, by "lunch aosp_x86; m -j" 2. Inject errors to the executables under out/host/linux-x86/bin, e.g. to `lpmake`. 3. Set up OUT_DIR (e.g., to /tmp/out) and build the same product again by "export OUT_DIR=/tmp/out; lunch aosp_x86; m -j". Check that the second run finishes successfully (with the binaries at /tmp/out as opposed to out/; otherwise it would fail the build due to the invalid binaries from step 2). Test: lunch a target; `atest --host releasetools_test releasetools_py3_test` Change-Id: I366099c3dfd5fa4282745ef258a8cf35338e1e42
This is the Makefile-based portion of the Android Build System.
For documentation on how to run a build, see Usage.txt
For a list of behavioral changes useful for Android.mk writers see Changes.md
For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.
This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.