aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Move all status output to stdout"android-p-preview-5Treehugger Robot2018-07-132-5/+7
|\
| * Move all status output to stdoutDan Willemsen2018-07-122-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | I've noticed a few instances of interleaved status messages in between lines in a terminal/Writer.Print call on our build servers. Since there's a lock protecting everything we write, I've got to assume this is a stdout vs stderr problem. Ninja had always been outputing to stdout, except for error messages, which are now marked with FAILED: like failed actions. Test: m blueprint_tools Test: m missing Change-Id: Idf8320d40694abf212c902c63a9703e4440ffb7a
* | Merge "Add exclude_files and exclude_dirs properties to java_import"Treehugger Robot2018-07-133-26/+40
|\ \ | |/ |/|
| * Add exclude_files and exclude_dirs properties to java_importColin Cross2018-07-123-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prebuilt jars sometime contain files that we don't want. In Make we would delete everything in META-INF when importing jars, but that caused problems when there were necessary files in there, so we added LOCAL_DONT_DELETE_JAR_META_INF. Soong does the opposite, keeping everything by default. Add properties to allow explicitly stripping unwanted files instead. Bug: 111389216 Test: m checkbuild Change-Id: I6d07f519ebc7d0e1bf0af93416bb569e3c2b1500
* | Fix race condition and loggingDan Willemsen2018-07-121-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The extra `defer os.Remove(fifo)` was sometimes racing with the next instance of ninja, removing the file in between when it was re-created and used. Since we're always removing the file before creating it, it's safe to just remove that. The error message for this failure wasn't all that good either, so move so use the status Print/Error calls inside the goroutine instead of the logging ones. Test: `build/soong/build_test.bash -only-soong` repeatedly Change-Id: Icfeb6b68802093bd3a07d3e46046ef7d1a89d4a1
* | Merge "Add a unified status reporting UI"Treehugger Robot2018-07-1239-550/+2624
|\ \
| * | Add a unified status reporting UIDan Willemsen2018-07-1239-550/+2624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new status package that merges the running of "actions" (ninja calls them edges) of multiple tools into one view of the current state, and gives that to a number of different outputs. For inputs: Kati's output parser has been rewritten (and moved) to map onto the StartAction/FinishAction API. A byproduct of this is that the build servers should be able to extract errors from Kati better, since they look like the errors that Ninja used to write. Ninja is no longer directly connected to the terminal, but its output is read via the protobuf frontend API, so it's just another tool whose output becomes merged together. multiproduct_kati loses its custom status routines, and uses the common one instead. For outputs: The primary output is the ui/terminal.Status type, which along with ui/terminal.Writer now controls everything about the terminal output. Today, this doesn't really change any behaviors, but having all terminal output going through here allows a more complicated (multi-line / full window) status display in the future. The tracer acts as an output of the status package, tracing all the action start / finish events. This replaces reading the .ninja_log file, so it now properly handles multiple output files from a single action. A new rotated log file (out/error.log, or out/dist/logs/error.log) just contains a description of all of the errors that happened during the current build. Another new compressed and rotated log file (out/verbose.log.gz, or out/dist/logs/verbose.log.gz) contains the full verbose (showcommands) log of every execution run by the build. Since this is now written on every build, the showcommands argument is now ignored -- if you want to get the commands run, look at the log file after the build. Test: m Test: <built-in tests> Test: NINJA_ARGS="-t list" m Test: check the build.trace.gz Test: check the new log files Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
* | | Merge "Don't create non-primary arch variant for recovery-only module"Treehugger Robot2018-07-123-0/+50
|\ \ \
| * | | Don't create non-primary arch variant for recovery-only moduleJiyong Park2018-07-123-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To save space, only the primary arch variant is installed to the recovery partition. This has been done in the imageMutator by not creating recovery variant for the non-primary arch. However, this caused a problem for recover-only module, i.e., recovery: true. Such module ends up creating no variant for the non-primary arch. Since every other modules are at least in one image variant, any dependency fro such module with no image variant can't be satisfied. In order to solve the problem, archMutator is modified to create only the primary arch for recovery-only modules. Bug: 111321972 Test: m -j (TestRecovery added) Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
* | | | Merge "Unset envsetup.sh variables inside build"Colin Cross2018-07-121-0/+12
|\ \ \ \ | | |_|/ | |/| |
| * | | Unset envsetup.sh variables inside buildColin Cross2018-07-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ANDROID_BUILD_TOP and other envsetup.sh varialbes is already forbidden in makefiles, but some tools run by the build (like hidl-gen) will use it if it is set. Since they are set by envsetup.sh, and sourcing envsetup.sh before building is optional, unset them inside the build to get consistent behavior. Bug: 79250545 Test: m checkbuild Change-Id: I3e7d9f01390ccdc34c49115f2f15cd7542d9974b
* | | | Merge "Change link type rule"Treehugger Robot2018-07-121-6/+13
|\ \ \ \ | |_|/ / |/| | |
| * | | Change link type ruleSundong Ahn2018-07-111-6/+13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | If linkType of a module is javaPlatform, the module will link to <lib>.impl instead of <lib>.stubs.system. Bug: 77577799 Test: make -j Change-Id: I2a9a0ec7c76c0fc304935f16c4c371aea39bffd6
* | | Merge "Export: phonyFactory -> PhonyFactory"Treehugger Robot2018-07-121-2/+2
|\ \ \ | |/ / |/| |
| * | Export: phonyFactory -> PhonyFactorySteven Moreland2018-07-111-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | When adding aidl_interface, the intention is to have module name 'foo' create modules 'foo-cpp' and 'foo-java' for consistency. I'm using a phony module to reserve 'foo' as a name for future use and also for sanity. Bug: 111117220 Test: create a phony module using the factory and use it to build Change-Id: Ib3214acb9b4bf48aa60a1a3c20b5d12129d1c3a6
* | Merge "Allow disabling LTO on eng"Treehugger Robot2018-07-111-0/+3
|\ \
| * | Allow disabling LTO on engJohn Reck2018-07-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Test: Verified setting never to true in hwui resulted in a fast incremental build Bug: 111277863 Change-Id: Ic3da6f3adc2c97f0d5f287402c460907533a5f71
* | | Use manifest merger in SoongColin Cross2018-07-118-20/+138
| |/ |/| | | | | | | | | | | | | | | | | | | | | Move the manifest merger config to Soong, and use it to merge manifests of static dependencies of android_library and android_app modules. Bug: 110848854 Test: m checkbuild Change-Id: Ib89e1f1a52a8b76157e4e0348baf42800412df0d Merged-In: Ib89e1f1a52a8b76157e4e0348baf42800412df0d Merged-In: I5d055ce63b8371db500f8868fb73ab3604b8c24a
* | Merge "Translate java libraries to java_library"Colin Cross2018-07-114-7/+161
|\ \
| * | Translate java libraries to java_libraryColin Cross2018-07-114-7/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In androidmk, translate BUILD_JAVA_LIBRARY to java_library plus installable: true, and BUILD_STATIC_JAVA_LIBRARY to java_library. In bpfix, rewrite java_library_static to java_library. Bug: 110885583 Test: androidmk_test.go, bpfix_test.go Change-Id: I63c2f759ae9c62a43f3439526552d2cd8e8cedc3
* | | Merge "Don't install java libraries by default"Colin Cross2018-07-116-34/+34
|\| | | |/ |/|
| * Don't install java libraries by defaultColin Cross2018-07-116-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Very few java libraries need to be installed, most are statically included in other modules. Device modules that are not installed also don't need to be dexed, saving checkbuild time. Change the default for java_library to not be installed, and allow libraries that should be installed to specify installed: true. This makes java_libary and java_library_static identical. It also simplifies some corner cases when converting from Make to Soong if a module is built for the host (which doesn't differentiate between static and non-static/installable) and statically for the device, which couldn't be represented in a single java_library in soong. Bug: 110885583 Test: m checkbuild, compare presubmit target files Change-Id: Idc0841c39a17cebd7bac3559c9408596d167a393
* | Merge "Fix error in build when OUT_DIR_COMMON_BASE is used"Treehugger Robot2018-07-111-8/+20
|\ \ | |/ |/|
| * Fix error in build when OUT_DIR_COMMON_BASE is usedPeter Kalauskas2018-07-101-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, gen-kotlin-build-file.sh will generate kotlinc-build.xml file with path that look like: /path/to/aosp-top//path/to/aosp-out/soong/.intermediates/... Also fixed a couple lint errors. Test: Set OUT_DIR_COMMON_BASE and was able to build Bug: 111309264 Change-Id: I86173571667deca79ee0d9a7324715c9a0e4cd97
* | Merge "Cleanup createVndkSourceAbiDump()"Logan Chien2018-07-112-14/+27
|\ \
| * | Cleanup createVndkSourceAbiDump()Logan Chien2018-07-102-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | This commit cleans up `createVndkSourceAbiDump()` and renames it to `shouldcreateVndkSourceAbiDump()`. Test: lunch aosp_walleye-userdebug && make Change-Id: Iff4379e2812c4b5c5baff288b938eed5d92e024f
* | | Add min_sdk_version to android_library_import modulesColin Cross2018-07-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | pom2bp now inserts a min_sdk_version into android_library_import modules. Bug: 110848854 Test: m checkbuild Change-Id: I1396eabd8bfa02755c829ddac03022ffb7a5673e
* | | pom2bp: move misplaced {{end}}Colin Cross2018-07-101-2/+2
| |/ |/| | | | | | | | | | | | | | | manifest property should only be added to aar imports and not jar imports. Bug: 110848854 Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.bp Change-Id: Ifaab81582c87f0af4419f90c3928d0d5d52cec33
* | Don't install android_library modulesandroid-o-mr1-iot-release-1.0.2Colin Cross2018-07-101-0/+1
| | | | | | | | | | | | | | | | Skip dexing and installing android_library modules, the platform can't load them directly anyways. Test: m checkbuild Change-Id: I4940569f0deb0eefbe52ac1bee6a32a8b2a2c5be
* | Merge "Fix error reporting when parsing genrule cmd"Colin Cross2018-07-101-11/+16
|\ \
| * | Fix error reporting when parsing genrule cmdColin Cross2018-07-091-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report errors inside the android.Expand lambda and don't return an error so that processing can continue and multiple errors can be reported. Check for errors (for example incorrect syntax of variables) immediately after Expand returns. Avoids a misleading error message: specified depfile=true but did not include a reference to '${depfile}' in cmd Bug: 111219250 Test: m checkbuild Change-Id: Id9a16c1609f5fd9345bfa1a2191261cff72fd382
* | | Merge "Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9."Tobias Thierer2018-07-101-14/+10
|\ \ \
| * | | Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9.Tobias Thierer2018-07-091-14/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag EXPERIMENTAL_USE_OPENJDK9 controls the *default* value of java_version / LOCAL_JAVA_LANGUAGE_VERSION, but that default value can be overridden by individual build targets. One requirement for individual build targets to opt-in to java_version 1.9 is for system modules to be generated even if the default language version is still < 1.9. We plan to allow this soon for libcore targets; therefore, this CL changes the system module targets to always be defined, regardless of the value of EXPERIMENTAL_USE_OPENJDK9. Test: In a workspace that has http://r.android.com/646840 "make" no longer runs into the build failure from bug 76219552. Bug: 76219552 Change-Id: I5193347452c7967f7695929619509aea0fd46844
* | / Add support for -apiMapping parameter in DocLava.Mathew Inwood2018-07-101-0/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used to output a mapping of class member signature to source position, which in turn is used for automated addition of annotations in frameworks code. Metalava support does not exist (yet), and may not be needed, since the addition of these annotations in a one-time thing. This change can be reverted once this is complete. See go/hidden-api-annotations for more context. Test: m Bug: 110868826 Change-Id: I90e409f6ea02b16eb9e03d92382f9bb46a8fdab5
* | Merge "Fix: recovery module is disabled on 32-bit targets"Treehugger Robot2018-07-102-16/+10
|\ \
| * | Fix: recovery module is disabled on 32-bit targetsJiyong Park2018-07-082-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug that recovery variant of a module is not created on 32-bit targets. The bug was happening because the creation of the recovery variant relied on DevicePrefer32BitExecutables() which returns false for 32-bit only targets. Now, recovery variant is checked against the primary architecture of the device that is returned by DevicePrimaryArchType(). Test: m -j adbd.recovery on aosp_arm and aosp_arm64 adbd is built under recovery/root/system/bin and it is ELF32 and ELF64, respectively for the targets. Test: m -j libc.recovery on aosp_arm, aosp_arm64, aosp_sailfish and the x86+arm target in mater. Only one libc.so is installed under recovery/root/system/lib (or lib64). Change-Id: I83a248d81f2c71dcfb0e9d887a75b71338f27b4d
* | | Merge "Sort and uniqify dangling rules list"Treehugger Robot2018-07-101-6/+13
|\ \ \
| * | | Sort and uniqify dangling rules listColin Cross2018-07-091-6/+13
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the dangling rules list sorted and unique in order to avoid very long lists when a dangling rule is referenced many times. Also prettify the output by indenting the list and printing "stopping" instead of a blank line for the fatal. Test: m checkbuild Change-Id: I8f7c27ae39b59f506b529d9995d90b0d6b9835d1
* | | Merge changes Ieaf37ba6,Ic69f1f93Treehugger Robot2018-07-108-72/+193
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: pom2bp: extract minSdkVersion from manifest into Android.bp Add support for min_sdk_version
| * | | pom2bp: extract minSdkVersion from manifest into Android.bpColin Cross2018-07-091-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When manifest merging in Soong is turned on the modules created by pom2bp will need to have min_sdk_version specified in order to prevent manifest_fixer from setting it to the current SDK level. Read the minSdkVersion attribute out of the AndroidManifest.xml file inside each .aar file. Bug: 110848854 Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.bp Change-Id: Ieaf37ba6eccaf32dc5d3411566335830b1a327ff
| * | | Add support for min_sdk_versionColin Cross2018-07-097-67/+128
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add min_sdk_version properties and use it for aapt2 --min-sdk-version and --target-sdk-version flags. Add an sdkContext interface that any function that needs an sdk version can take in order to get the values for the current module. Bug: 110848854 Test: m checkbuild Change-Id: Ic69f1f935d8b865ec77689350407df08bfac5925
* / / Document build/soong/scripts/setup_go_workspace_for_soong.shColin Cross2018-07-091-0/+12
|/ / | | | | | | | | Test: none Change-Id: I507b7118bfc240166dced0cc26ab523ce56f68a2
* / Add option to compile dex for a Java libraryDavid Brazdil2018-07-091-2/+13
|/ | | | | | | | | | | | | Currently Soong will only compile a Java library into dex if the library has device support and is installable. For our use case of inspecting the dex at build time this is not sufficient. Add a new "compile_dex" device property which forces the creation of a dex rule. In this case, the class jar remains the output file of the module. Bug: 79409988 Test: on related CL Change-Id: Ia908a47148a03a0bdb0da4315cce6efc86c51865
* Merge "aidl: -ninja -> --ninja"Treehugger Robot2018-07-071-1/+1
|\
| * aidl: -ninja -> --ninjaSteven Moreland2018-07-061-1/+1
| | | | | | | | | | | | Bug: 110967839 Test: AIDL's runtests.sh Change-Id: I49c0a2526b6d4083c927104a3e66017080000847
* | Ensure bpglob is built earlyDan Willemsen2018-07-062-6/+15
|/ | | | | | | | | | | | | | | | | | | This matches the change to blueprint's blueprint_impl.bash: https://github.com/google/blueprint/pull/213 It allows us to run bpglob during the two bootstrap phases, so we're never running minibp or the primary builder in a later phase than normal. Also removes the dependency on out/soong/build.ninja from the main phase, since it's never generated by the main phase anymore, and is tripping the dangling dependency checks. Bug: 73646380 Test: m nothing Test: rm frameworks/base/core/java/android/content/pm/dex/ArtManager.java Test: m nothing (soong re-runs) Change-Id: Ia3952d015ad6091ad5a841f555acda78c9390e84
* Use correct variant for annotation processors.Mathew Inwood2018-07-032-4/+7
| | | | | | | | | Annotation processors should always have a common host variant, rather than a device variant as the build was looking for before. Bug: 110868826 Test: m Change-Id: I2b7d0e7ed1af3f2f9ddb87d2bf36920737a507e9
* Merge "Add api_dirs property and use module name as prefix"Treehugger Robot2018-07-032-16/+19
|\
| * Add api_dirs property and use module name as prefixSundong Ahn2018-06-252-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The soong connect the prebuilt library according to LOCAL_SDK_VERSION. But some sdk libraries has diffrent version policy with LOCAL_SDK_VERSION. For this, we need to support direct link to the prebuilt library instead of creating a new LOCAL_XXX_SDK_VERSION. So, The base module name is used as the prefix for the prebuilt module name. Remove the empty file check to support the absence of a prebuilt library and add api_dirs property Bug:77577799 Test: make -j Change-Id: I1086977d26e4ddfd62e290637126d44e1b248bac
* | Merge "Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags""Yi Kong2018-06-301-7/+4
|\ \