aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Refactor ccColin Cross2016-03-212-5/+12
| | | | | | | | | | | | Refactor all of cc in order to use composition instead of inheritance. All cc module types exported by cc are now *cc.Module objects, with compilation, linking, and installing steps delegated to different objects in order to form the full module type. Additional features that modify dependencies and flags can be inserted in a features object list, and custom module types can be created by adding a Customizer object that can modify properties. Change-Id: Ie1283d14920f7856f6947b0530606b2f4d58fab0
* Split Allow_missing_dependencies from Unbundled_buildDan Willemsen2016-03-162-4/+5
| | | | | | | There are stripped down branches used to build other things than just unbundled apps (like the AOSP llvm branch used to build llvm prebuilts). Change-Id: Id772eac8c4622458591b52f9f27723fdb83f9a85
* Fix optional intermediates path for unbundled buildsDan Willemsen2016-03-111-1/+1
| | | | | | | | | On an unbundled build, if an include directory was missing, I generated an intermediate path with PathForModuleOut. That included another copy of $OUT_DIR, which I didn't notice. This fails if $OUT_DIR is an absolute directory. Just manually set up the path for now. Change-Id: I3821d562c929e69ed2fccb7e88affed384a7789e
* Support missing include dirs for unbundled branchesDan Willemsen2016-03-111-0/+15
| | | | | | | | Treat absolute paths specified from a module (include_dirs, etc) like actual module dependencies. If it doesn't exist, produce a ninja error instead of refusing to create the ninja file. Change-Id: I662b9bb2af04b2006984a07d1ccb700b63dde582
* Propagate missing dependencies when using whole_static_libsDan Willemsen2016-03-111-0/+8
| | | | | | | | Currently, whole_static_libs with missing dependencies are silently ignored. Instead, when getting the object files from the other module, add its missing dependencies to the current module. Change-Id: I12472dede2dfafdded56268bfd37f60063b637c4
* Merge "Replace Device_uses_{dl,je}malloc with Malloc_not_svelte"android-n-preview-1Dan Willemsen2016-03-041-16/+9
|\
| * Replace Device_uses_{dl,je}malloc with Malloc_not_svelteDan Willemsen2016-03-011-16/+9
| | | | | | | | | | | | | | This no longer switches between dlmalloc and jemalloc, it just changes the jemalloc cflags for non-svelte devices. Change-Id: Ic6975de89a53a42e4735dbdcde68367ebfc42f9b
* | Remove useless LOCAL_ACP_UNAVAILABLEDan Willemsen2016-03-011-3/+0
| | | | | | | | | | | | The make build system no longer needs LOCAL_ACP_UNAVAILABLE. Change-Id: Ieef1415488853add9c5f5ab24219f9c6d3d13aa5
* | DeviceUsesClang should default to trueDan Willemsen2016-03-011-1/+1
|/ | | | | | It defaults to true in Make now. Change-Id: Id216c35d4a4fc87ce19067a357561a7fc814cbbb
* Refactor Android.mk generationDan Willemsen2016-02-092-90/+70
| | | | | | | | | | | | | | | | | | | Now, instead of combining multiple binaries into a single BUILD_PREBUILT definition, use separate instances for every module variant. This fixes HOST vs HOST_CROSS prebuilts, and should be saner overall. From make, these should look the same, we're only just using one instance of prebuilt_internal per BUILD_PREBUILT call instead of multiple. With that simplification, we don't have to store as much state, and can directly write into the buffer. Also switch from io.WriteString to fmt.Fprintln, which will require fewer explicit string concatentations, and we don't need to worry about newlines. Allow the module-provided functions to return errors. Change-Id: If30453b21fa21387f635626618d8fabfc78e6859
* Add windows x86_64Dan Willemsen2016-02-082-0/+3
| | | | | Bug: 26957718 Change-Id: I5cfa2f44c27eac0805d21865c45546ed3c2c2103
* Fix USE_SOONG[_FOR_KATI]Dan Willemsen2016-01-142-3/+3
| | | | | | | | | | Make was depending on the installed path for ckati/makeparallel, since I didn't want to hardcode intermediate paths. For modules in USE_SOONG, we export the intermediate paths, so we don't need to install. Change-Id: I90bf3ad1461e239a8a40fd0c8ddbc679cf00d126
* Mips builds in the megadevice nowDan Willemsen2016-01-131-8/+8
| | | | | | | Some of the dsp variants still have problems, but they also don't build under make. Change-Id: Ied9b4a1766de5d8a61d74a0ec629e0e68bfe3bc4
* Add Mega_device configuration optionDan Willemsen2016-01-133-10/+83
| | | | | | | | | | | This lets you configure soong to build for every supported architecture in one build. Installation is disabled, since it's not actually setting up multiple devices, and would try to install multiple versions to a single path. Configurations that do not build are commented out. Change-Id: I92ddea0b9ddbd53e12187c7f581b8ac5bd5fdec3
* Export all modulesColin Cross2016-01-111-38/+4
| | | | | | | Export all modules to out/soong/Android.mk, even if they have a corresponding Android.mk file next to the Android.bp file. Change-Id: I14b67b1108f0c0ed8f9d9202c4af3a37f5cbf7d1
* Remove Dlmalloc_alignmentDan Willemsen2016-01-061-4/+0
| | | | | Bug: http://b/26403338 Change-Id: I03121ea12cee7044c863bc281260d186130eeeb1
* Allow Brillo-specific version scriptsDan Willemsen2016-01-051-0/+4
| | | | Change-Id: Ie7ba6200ed813f7eb53687c2b672e34eff16263b
* Improve path component validationDan Willemsen2015-12-212-9/+27
| | | | | | | | Detect when a specific path component tries to escape the path that came before it -- so that a user-provided value can't use '..' to escape the directories laid out by the build system. Change-Id: I02d52d9baadb7152448a34f4e8b573fe3c032b12
* Refactor install pathsDan Willemsen2015-12-212-15/+47
| | | | | | | | Explicitly allow installation into the data partition instead of using "../data" for tests. At the same time, pipe through the information required for vendor modules. Change-Id: I6baf9d828c285e1080e43074beef8aebdbb38875
* Make global C include paths optionalDan Willemsen2015-12-182-18/+72
| | | | | | | | Only add them to the global C include paths if they exist. And make sure to set up proper dependencies so that we notice when they are added or removed. Change-Id: Ia9df14f6ae6869927ad3d3a15fb5a8081f616a81
* Sort modules before writing to Android.mkColin Cross2015-12-182-0/+23
| | | | | | | | Sort the modules before writing them to the Android.mk file to prevent it changing every time soong rebuilts itself. Avoids unnecessary makefile reparses by kati when it sees Android.mk change. Change-Id: Ie2cebb25a82d131ee5b556f8e4b3b317d080692c
* Delay dependency errors to ninja time for unbundled buildsColin Cross2015-12-183-0/+47
| | | | | | | | | Unbundled builds may use a subset of the tree, which can bring in unused modules but not their dependencies. Delay handling of dependency errors for unbundled builds to ninja time, which will prevent errors if only modules with satisified dependencies are built. Change-Id: Ib93bae93fcfa0b55df500a30d8e35231ffb0987c
* Merge "Make all soong modules optional when building in make"Colin Cross2015-12-181-1/+2
|\
| * Make all soong modules optional when building in makeColin Cross2015-12-171-1/+2
| | | | | | | | | | | | | | When building inside make, Soong is not responsible for installing any modules, so make everything optional. Change-Id: I1190c78663c9d5ff6f511ca43b317031c619afe7
* | Merge "Fix gofmt"Colin Cross2015-12-181-1/+1
|\|
| * Fix gofmtColin Cross2015-12-171-1/+1
| | | | | | | | Change-Id: Ib5e4db599a6dd858b3a1b1cdb75017b01eac4911
* | Merge "Add pointer and bool support for product variables"Colin Cross2015-12-181-3/+10
|\|
| * Add pointer and bool support for product variablesColin Cross2015-12-171-3/+10
| | | | | | | | Change-Id: I90c07878f3c23a6bab1530daa1a80ae1685ab154
* | Support "." in cpu and arch variant namesColin Cross2015-12-161-3/+3
| | | | | | | | | | | | | | | | cortex-a53.a57 is a valid cpu variant, and needs to be translated to cortex_a53_a57 when used as a field name. Replace dashToUnderscoreReplacer with a replacer that also converts "." to "_". Change-Id: I1c496249b50d8e3a8d2bd830bc890f43ad9ee29e
* | Skip generating prebuilts entries for disabled modulesColin Cross2015-12-151-0/+4
|/ | | | Change-Id: I5b17588789acb77bc5cfe2150a3a5decfd5bd01d
* Add brillo cflagsColin Cross2015-12-151-0/+1
| | | | | | | Add __BRILLO__ to global cflags when building for a brillo product. Bug: 26165350 Change-Id: I0100a8821b763075d1873d0d48fd5bd217afb580
* Only change behavior when actually embedded in makeDan Willemsen2015-12-153-3/+30
| | | | | | | | | | The change to enable embedding in make change the default behavior to produce an Android.mk file, change the ninja builddir, and add the -soong suffix to the end of target names. These don't make sense if we're not building inside make, so detect if we're running under make by checking for a .soong.in_make file in the builddir. Change-Id: I1a0f4c1becb327c769b8a130cafef11d83eb49f4
* Use `Path` instead of string for file pathsDan Willemsen2015-12-098-209/+956
| | | | | | | | | | | | This centralizes verification and common operations, like converting the path to a source file to the path for a built object. It also embeds the configuration knowledge into the path, so that we can remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that leads to paths like './path' instead of just 'path' like make is doing, causing differences in compiled binaries. Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
* Handle multiple blueprint files in one dirDan Willemsen2015-12-071-15/+12
| | | | | | | | | | | If there are multiple blueprint files in one directory, say an Android.bp, and a build=['other.bp'] entry that pulls in another blueprint file from the same directory, we'd look for a matching Android.mk twice. This would cause duplicate glob rules. Instead, keep track of blueprint directories rather than files. Change-Id: I4f224e51337ffd5e5e48257ac3458c2d8b2061fa
* Add unbundled_build product variableColin Cross2015-12-011-1/+9
| | | | Change-Id: Ieffbc13ae1273200ed4af93e97c3142b707a7cf1
* Hybrid soong/mk build using prebuiltsDan Willemsen2015-12-014-24/+300
| | | | Change-Id: I96daa69af27bd19c8bfbe327a1318f51c738fc03
* Blueprint API: PackageContext is now an InterfaceDan Willemsen2015-12-012-2/+2
| | | | Change-Id: I656ae3b4657514faa4a1d12d6a33e9cefd8efb84
* Change soong parameter name disabled -> enabledDan Willemsen2015-11-301-13/+13
| | | | | | This looks cleaner when we need to enable windows builds for modules. Change-Id: I61553e2124e08002b0bd9e35c1406c905718f2f7
* Support cross-compiling Windows binaries on LinuxDan Willemsen2015-11-303-29/+184
| | | | | | | | This defines another mutator between HostOrDevice and Arch that will expand host modules into a module for each host type (Darwin/Linux/Windows) that is currently being built. Change-Id: I4c8ac6b616c229f6bd45ad8a35902652fb6a4fff
* Add mips64Colin Cross2015-11-241-1/+5
| | | | Change-Id: I2b4adbc1a1568b66515243005beda2c56a4a0519
* Add mipsColin Cross2015-11-241-0/+8
| | | | Change-Id: Icb05292877a60939542ce09d9774e4b9d1353502
* Add x86_64Colin Cross2015-11-241-0/+15
| | | | Change-Id: Ib0f31d147546ae187697867c6a0b937266bb9b39
* Add x86Colin Cross2015-11-241-4/+13
| | | | Change-Id: I28e78cd49b184e0aa50c1c562b6bf719300e0832
* move arch variant structs down a levelColin Cross2015-11-231-47/+79
| | | | | | | | | Use blueprint's new anonymous embedded struct feature to move the arch variant properties down a level, replacing arch.cortex_a9.srcs with arch.arm.cortex_a9.srcs, while still supporting top-level properties like arch.arm.srcs. Change-Id: I14820b75b31586ef1e16a4812dcb1f5fdf1ff941
* Add arch featuresColin Cross2015-11-231-4/+42
| | | | | | | | Allow architecture toolchains to register "features" supported by the current variant, and then apply properties from the selected features. Equivalent to the ARCH_*_HAS_* variables in the combo makefiles. Change-Id: Ib6823be1c1a52da677d081db9f24336a072eaf39
* make arch and variant parsing more robustColin Cross2015-11-231-6/+32
| | | | | | | | | | | Post-process the arch and cpu variants to treat the arch name or "generic" as an empty variant. Filter out extra empty abis. Ignore empty arches. Print a useful error message when appending properties fails to find the target field, when an unknown architecture is used, or when a toolchain has not been implemented for the selected architecture. Change-Id: I671d4cd04975f4f29aefc4267b3a624868ce6a75
* Delete androidbpColin Cross2015-11-192-53/+0
| | | | | | | androidbp is gone, replaced with combining kati ninja output for makefiles with blueprint ninja output for soong. Change-Id: I00b9e28877abf2ceb2223d3ccf0637bc1b7571bb
* Use Rule-local implicit dependenciesDan Willemsen2015-11-173-8/+8
| | | | | | | | | | | Depends on https://github.com/google/blueprint/pull/78 This uses the new CommandDeps field to move implicit dependencies embedded in the Command string next to the definition, instead of having to specify them in every BuildParam struct. This should make it easier to verify dependencies. Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
* Add armv8-a arch variantColin Cross2015-11-161-0/+3
| | | | Change-Id: I7f6655f52068568e699fcd0f2a16202254cd3786
* Switch Disabled to a *bool for proper arch overridesDan Willemsen2015-11-091-3/+4
| | | | Change-Id: I0b26d9ae2443825479713f49c5eb704597522ec8