aboutsummaryrefslogtreecommitdiffstats
path: root/android/config.go
Commit message (Collapse)AuthorAgeFilesLines
* Support path exclusion for native coverage.Ryan Campbell2017-02-271-2/+12
| | | | | | | | | | Specify list of paths to exclude from coverage instrumentation. Test: make NATIVE_COVERAGE=true COVERAGE_PATHS=hardware/interfaces COVERAGE_EXCLUDE_PATHS=hardware/interfaces/graphics Bug: 35769817 Change-Id: I3bf10e5e5697d140d6cff73d000768b00aa28ca4
* Native Coverage support in Soong (gcov)Dan Willemsen2017-02-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is configured the same as make -- a global NATIVE_COVERAGE=true flag to allow native coverage, then COVERAGE_PATHS=path1,path2,... to turn it on for certain paths. There are .gcnodir files exported to Make and saved in $OUT/coverage/... files which are `ar` archives containing all of the compiler-produced .gcno files for a particular executable / shared library. Unlike the Make implementation, this only passes links the helper library (automatically through --coverage) when one of the object files or static libraries being used actually has coverage enabled. Host support is currently disabled, since we set -nodefaultlibs, which prevents libclang_rt.profile-*.a from being picked up automatically. Bug: 32749731 Test: NATIVE_COVERAGE=true COVERAGE_PATHS=system/core/libcutils m -j libbacktrace libutils tombstoned $OUT/coverage/system/lib*/libcutils.gcnodir looks correct (self) $OUT/coverage/system/lib*/libbacktrace.gcnodir looks correct (static) $OUT/coverage/system/lib*/libutils.gcnodir doesn't exist (shared) $OUT/coverage/system/bin/tombstoned.gcnodir looks correct (executable) Test: NATIVE_COVERAGE=true COVERAGE_PATHS=external/libcxxabi m -j libc++ Confirm that $OUT/coverage/system/lib*/libc++.gcnodir looks correct (whole_static_libs) Change-Id: I48aaa0ba8d76e50e9c2d1151421c0c6dc8ed79a9
* Removed Bluetooth build variables from the soong build parserJack He2017-02-091-8/+0
| | | | | | | | | * Removed BLUETOOTH_HCI_USE_MCT * Removed BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED Bug: 34951912, 35203653 Test: Code compilation, no visible user effects Change-Id: I89af075a334f2ec7b2a3046a4aaa5bcc19d454e0
* Fix envDeps initialization and lockingColin Cross2017-02-061-3/+5
| | | | | | | | | | | | If Config.GetEnv was called when envDeps was uninitialized (for example in a test) it would panic, which if recovered (for example in a test) would cause it to continue without unlocking the mutex, and could later deadlock. Fix the initialization by initializing in GetEnv if necessary, and use defer to avoid holding the mutex after a panic. Test: soong tests Change-Id: I453522faaf47ff6fbc4702345cfe177100bdc522
* Hide CFI behind a global flag.Vishwath Mohan2017-01-191-0/+4
| | | | | | | | | | | | This CL ensures that locally enabling CFI in a .bp file is not honored unless it is enabled globally using ENABLE_CFI=true first, effectively hiding it behind a flag. Bug: 30227045 Bug: 22033465 Test: m -j40 works and device boots Test: cfi is correctly honored only when the global flag is set. Change-Id: Iccc6e4bf5e7828ab8ce6056f3e40922712faa0d8
* Add Android.bp variables to the soong build parserandroid-n-mr2-preview-1Jack He2017-01-111-0/+13
| | | | | | | | | | | * BtConfigIncludeDir: BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR * BtHcilpIncluded: BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED * BtHciUseMct: BLUETOOTH_HCI_USE_MCT Bug: 32958753 Test: Code compilation, no user visible effects Change-Id: I0dc53172ee823e4e0fa69749e1297713796538cf
* Add ArtUseReadBarrier to ProductVariables.Hiroshi Yamauchi2016-12-191-0/+4
| | | | | | Bug: 33492005 Test: top-level angler build. Change-Id: Ib04284bac923a143038655d495bcbacaabf61440
* Support system/vendor for devices without a vendor partitionDan Willemsen2016-12-051-0/+7
| | | | | Test: lunch aosp_arm-eng; m -j vulkan.default Change-Id: I91eabf98f53c455ec4ade95215f11a6f89631747
* Provide config helpers for environment variablesColin Cross2016-11-291-0/+18
| | | | | | | Add GetenvWithDefault, IsEnvTrue, and IsEnvFalse helpers to Config. Test: m -j checkbuild Change-Id: Id855e5349115eb2a18b2e73cfd1bd84b5874ff93
* Add basic VNDK support in SoongDan Willemsen2016-11-281-0/+7
| | | | | | | | | | | | | | | | | | Export a list of libraries in the VNDK, which is currently empty. Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK version for modules that specify use_vndk: true. Modules that use the vndk have some configuration as if they were building against the NDK (the absence of globally defined headers), but in other cases look like platform modules (using the platform libc++, for now). This change does not attempt to enforce any linking constraints, that will come in a later patch. Test: out/soong/build.ninja doesn't change Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
* Revert "Revert "Use the platform SDK version from the config.""Dan Albert2016-11-101-1/+5
| | | | | | | | | | This reverts commit 74b8b55bb28629eb2a2d275f744688b34c2efa5e. Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \ build/soong/scripts/build-ndk-prebuilts.sh Bug: None Change-Id: Ia320609ec6fb382b13ff9007a6496b73198ff871
* Revert "Use the platform SDK version from the config."Dan Albert2016-11-091-5/+1
| | | | | | | | This reverts commit 9bef52380933a3f1444607739d94a98506e0b441. Reason for revert: Broke things Change-Id: Ic3deac4fb6992572ac0cc95fa04d003e0c29f113
* Use the platform SDK version from the config.Dan Albert2016-11-081-1/+5
| | | | | | | | N is in AOSP now. Test: make ndk && ls out/soong/ndk/platforms/android-24 Bug: None Change-Id: I846ee12d10e962931bf22c94c37cdf7207dd4ff7
* Fix race condition writing soong.configColin Cross2016-11-031-4/+11
| | | | | | | | | | | | soong_build is run twice simultaneously now, once for manifest generation and once for docs generation. If one starts writing the default soong.config file, and the other starts reading it, the reader can see an empty file and fail. Write the soong.config file to a temporary file and the atomically rename it into place. Bug: 32628314 Test: rm out/soong/soong.config && m -j blah && cat out/soong/soong.config Change-Id: I8119b11d45093284b24cbc926d81eb9ea4bf2e27
* Support sanitizing a single device archColin Cross2016-11-021-8/+6
| | | | | | | | | | | | Allow specifying one or more architectures to sanitize for. Defaults to sanitizing all architectures. Allows reducing the cost of sanitization by only sanitizing half of the platform. Bug: 29498013 Test: No change to build.ninja files with m -j SANITIZE_TARGET=address Test: m -j SANITIZE_TARGET=address SANITIZE_TARGET_ARCH=arm Test: nm -D $OUT/system/bin/app_process64 | grep asan, no asan symbols found Change-Id: I972cccc2f19443895d47b44bd8104105f93ffb7d
* Add clang-tidy supportDan Willemsen2016-10-311-0/+11
| | | | | | | | | | | | | | | | For every file which we can run clang-tidy (C/C++ clang-built), we add a new build node that depends on the object file (since clang-tidy does not export a depfile), and is depended on by the link step. This is better than how we're doing it in make, since calling tidy can be turned on or off without needing to rebuild the object files. This does not attempt to port WITH_TIDY_ONLY from Make, since the way that it works is broken (due to the lack of a depfile). Bug: 32244182 Test: WITH_TIDY=true mmma -j bionic/libc Test: ./soong (Setting ClangTidy: true) Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
* Add an NDK ABIs mega build configuration.Dan Albert2016-10-191-1/+9
| | | | | | | | | | The NDK needs generic prebuilts for all architectures. Test: echo '{ "Ndk_abis": true }' > soong.config && \ ./soong $OUT_DIR/ndk.timestamp Bug: None Change-Id: I2ee3ebbf4cbd1bc593f9e4e9fb44fb66711da9d5
* Re-enable prebuilt_testColin Cross2016-10-141-2/+4
| | | | | | | | | | | Use a temporary directory as the build directory during tests so files don't get written to the source tree. Also add a few more tests for prebuilts with no file specified. Bug: 31800129 Test: m -j, make sure .soong.environment is not written to the source tree Change-Id: I623bc114b2ff534c8df9fb3ce273e804711f8f05
* Initial prebuilt supportColin Cross2016-10-131-0/+5
| | | | | | | | | | Support prebuilt shared libraries as an initial proof-of-concept of prebuilts. Future changes will support binaries and static libraries, and the ability to select which to use based on something besides blueprint properties. Test: TestPrebuilts run during m -j Change-Id: I6e84da667e9005ae11844bad01d25cbe4ced1ce3
* Remove HostPrefer32BitExecutablesColin Cross2016-09-021-4/+0
| | | | | | | HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to keep the SDK building as 32-bit, but is never set any more. Change-Id: I7c2db269d3f7fa1f4e0c022cbced789755a62d81
* Enable goma in soongColin Cross2016-08-311-0/+4
| | | | | | | | | | When the UseGoma flag is set, put all rules except the C compilation rule in an externally defined local_pool, which will have been created by kati. The gomacc wrapper will already be in the CC_WRAPPER environment variable. Bug: 31142427 Change-Id: I699d4edff2e302eee398dad8692ceb14721a628c
* Add support for preferred arch symlinksColin Cross2016-08-251-0/+9
| | | | | | | | | | Add a symlink_preferred_arch property to binaries to allow compiling the binary for multiple architectures and then creating a symlink to the preferred archicture, for example dalvikvm32 and dalvikvm64, with dalvikvm symlinked to dalvikvm64. Test: mmma -j art/dalvikvm Change-Id: Ied15f2be9d52c01006fe8ac207c175b78558eab1
* Add artColin Cross2016-08-251-0/+13
| | | | | | Re-land I557c86d2282178d215ea17abb71e556bdc4ba722 Change-Id: Ic26e1a6b17569acbfe68b4a219982ce45cecefbd
* Revert "Add art"Colin Cross2016-08-251-8/+0
| | | | | | This reverts commit f7288f390672f917e05bf03e495b4502e6e1b0cb. Change-Id: Ibb63fe2a95d1517fea63a65a7dbe5cac84902107
* Add artColin Cross2016-08-231-0/+8
| | | | Change-Id: I557c86d2282178d215ea17abb71e556bdc4ba722
* Add DeviceConfig and OncePer objectsColin Cross2016-08-171-12/+42
| | | | | | | | | Add DeviceConfig to store per-device configuration information. Put a OncePer object inside Config and DeviceConfig, which computes a value once per key per object to allow build logic to store arbitrary per-build or per-device computed values. Change-Id: I1a38b426f29d223ef5e803e0d4d9604500de2fd2
* Use PlatformSdkVersion from MakeDan Willemsen2016-07-191-1/+2
| | | | | | This doesn't need to be hardcoded, and should be updated anyways. Change-Id: Ie28d0d7655e8db3c02d110ae578a763a69b73f92
* Return copies of global sanitizer slicesColin Cross2016-07-061-2/+2
| | | | | | | | | sanitize.begin() modifies the slice returned by Config.SanitizeHost() and Config.SanitizeDevice(), return a copy so the global slice doesn't get corrupted. Bug: 29188876 Change-Id: I4c7a59b7e96529166519b23a1ebda39b8e060c58
* Simplify arch target handlingColin Cross2016-06-021-6/+17
| | | | | | | | | | | | Soong's multi-architecture building has grown complex, with the combination of HostOrDevice+HostType+Arch necessary to determine how to build a variant of a module, and three separate mutators to split each into its variations. Combine HostOrDevice+HostType into Os, which will be Linux, Darwin, Windows, or Android. Store Os+Arch as a single Target. Change-Id: I92f2e2dac53617d595a35cc285d2bd348baa0fbd
* Revert "Simplify arch target handling"Colin Cross2016-06-031-17/+6
| | | | | | This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e. Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
* Simplify arch target handlingColin Cross2016-06-021-6/+17
| | | | | | | | | | | | Soong's multi-architecture building has grown complex, with the combination of HostOrDevice+HostType+Arch necessary to determine how to build a variant of a module, and three separate mutators to split each into its variations. Combine HostOrDevice+HostType into Os, which will be Linux, Darwin, Windows, or Android. Store Os+Arch as a single Target. Change-Id: Iae677eff61a851b65a7192a47f2dc17c1abb4160
* Start using blueprint_go_binaryDan Willemsen2016-05-311-0/+4
| | | | | | | | And install the tools into a more obvious location. soong_env is not moved, since we need it to exist early, so that we can use it in soong.bash in case there's a build failure. Change-Id: I9bd1fa320d84d180b2cf3deb90782d380666f7a6
* Rename common to androidColin Cross2016-05-181-0/+323
Rename the "common" package to "android", because common is too generic. Also removes all android.Android naming stutter. Ran: gomvpkg -from 'android/soong/common' -to 'android/soong/android' gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext' gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext' gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase' gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext' gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext' gorename -from '"android/soong/android".AndroidModule' -to 'Module' Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7