aboutsummaryrefslogtreecommitdiffstats
path: root/android
Commit message (Collapse)AuthorAgeFilesLines
* Support path exclusion for native coverage.Ryan Campbell2017-02-272-4/+15
| | | | | | | | | | 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
* Remove cpusets and schedboost product variablesColin Cross2017-02-231-10/+0
| | | | | | | | | They are no longer needed, remove them. Bug: 35129304 Bug: 35128496 Test: builds Change-Id: Ib144ddc2db40bc4f38a4e06ca40eabe85814e03c
* Native Coverage support in Soong (gcov)Dan Willemsen2017-02-142-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-092-10/+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
* Add support for CMakefile generationFabien Sanglard2017-02-072-4/+1
| | | | | | Test: Manually generated CMakeLists.txt for gui/ui/aapt2. Change-Id: I7dedc300c1e50b8e39bc58091b650c0bbe2c62da
* Added phony module type for soong.Nan Zhang2017-02-062-2/+8
| | | | | | | | | The "required" field within "phony" module in .bp file has to be non-empty. And "phony" module doesn't contain any "src" files. Bug: b/32981153 Test: make -j out/soong/build.ninja Change-Id: Iaa2009467c44702572b97ca9cbd02c1d368c8d83
* 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
* Support data properties for test binariesColin Cross2017-02-022-12/+50
| | | | | | | | | | | Allow tests to specify a data property that lists files or filegroup modules that will be packaged alongside the test. Also add a path property to filegroup modules to allow shifting the path of the packaged files, and add ExpandSourcesSubDir to expand the filegroup sources while including a shifted relative path in the Paths objects. Test: soong tests, manually adding data to a module Change-Id: I52a48942660e12755d313ef13279313361b4fc35
* Update soong to use pathtools.FileSystemColin Cross2017-02-022-8/+11
| | | | | | | | Update soong to follow changes in https://github.com/google/blueprint/pull/141 Test: soong tests Change-Id: I49a9b83cac7590dc75b26b31136b8707c188bc4a
* Fixed then comments to describe how to use android.ModuleBase object.Nan Zhang2017-02-021-10/+10
| | | | | | | Since we have changed the package name from 'common' to 'android' Test: Manual. Change-Id: Ic9649f3216609b36fa31db096509de42f83e9ba4
* Remove extra basePath from ModuleSrcPathColin Cross2017-02-011-11/+5
| | | | | | | | | ModuleSrcPath contains an embedded basePath as well as a SoucePath that contains another basePath. Remove the embedded basePath, and make the SourcePath embedded. Test: no change to build.ninja Change-Id: I3cdf3477eca41ed35fac08a892aab22cbcdb2224
* Hide CFI behind a global flag.Vishwath Mohan2017-01-192-0/+5
| | | | | | | | | | | | 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-112-0/+17
| | | | | | | | | | | * 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
* Merge "Do not duplicate arch properties when cpu variant == arch variant"Treehugger Robot2016-12-201-5/+7
|\
| * Do not duplicate arch properties when cpu variant == arch variantColin Cross2016-12-201-5/+7
| | | | | | | | | | | | | | | | | | build/make/board/generic_mips/BoardConfig.mk sets TARGET_CPU_VARIANT := TARGET_ARCH_VARIANT, which can cause the same variant-specific properties to be applied twice. Test: lunch aosp_mips-eng && mmma -j external/skia TARGET_ARCH_VARIANT=mips32r2dspr2-fp Change-Id: Ie4abe804f8ce898bf89664ae749b9bc8ac3e649f
* | Add ArtUseReadBarrier to ProductVariables.Hiroshi Yamauchi2016-12-192-0/+6
| | | | | | | | | | | | Bug: 33492005 Test: top-level angler build. Change-Id: Ib04284bac923a143038655d495bcbacaabf61440
* | Support filegroupsColin Cross2016-12-171-1/+40
|/ | | | | | | | | | filegroup is a module that contains a list of files, and can be used to export files across package boundaries. filegroups (and genrules) can be referenced from srcs properties of other modules using the syntax ":module". Test: m -j Change-Id: I3d6fc4819c0b4225b474e0ad42f0d947f55a5961
* Support arm_on_x86 propertiesColin Cross2016-12-081-0/+23
| | | | | | | | Allow Android.bp files to set properties when an x86 device supports arm abis. Test: lunch aosp_fugu-userdebug && mmma -j frameworks/compile/libbcc Change-Id: Ic142a3f93175924a826dea9908b2e5183a486184
* Support eng product variableColin Cross2016-12-081-0/+12
| | | | | | | | The eng product variable will be true for builds where TARGET_BUILD_VARIANT==eng. Test: mmma -j frameworks/compile/libbcc Change-Id: I808129740643495370bea64df3fe5bcf01eb9915
* Support system/vendor for devices without a vendor partitionDan Willemsen2016-12-053-1/+10
| | | | | Test: lunch aosp_arm-eng; m -j vulkan.default Change-Id: I91eabf98f53c455ec4ade95215f11a6f89631747
* Import/Export LOCAL_PROPRIETARY_MODULEDan Willemsen2016-12-051-0/+3
| | | | | | Test: androidmk hardware/broadcom/libbt/Android.mk Test: m -j vulkan.default, inspect out/soong/Android-aosp_flounder.mk Change-Id: I8a9553f772a1d434eb0069c1575e1b0d6db36bc9
* Fall back to prebuilts if source modules are disabledColin Cross2016-11-303-36/+31
| | | | | | | | | | | | | | | In lieu of having an environment variable to override prebuilts preferences (for now), fall back to prebuilts whenever the source module is disabled. Complicated source modules (like LLVM) that already have Go logic can then use an environment variariable to disable their source module whenever they want to use prebuilts. Computes UsePrebuilt once using information from both the source and prebuilt modules, and stores the result in the prebuilt module. Test: m -j libLLVM Test: m -j libLLVM FORCE_BUILD_LLVM_COMPONENTS=true Change-Id: Ib0819a03e9492e55f55de3402e05b3a043644a39
* 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
* Disable installing unused prebuiltsColin Cross2016-11-291-4/+10
| | | | | | | | If the source module is being used instead of the prebuilt module, disable installing the prebuilt module. Test: m -j checkbuild Change-Id: I55e77021b0f9572b0737d960cba89274f696775d
* Don't generate Android.mk data if the module is disabledColin Cross2016-11-291-4/+5
| | | | | | | | | Move the calls to the AndroidMkProvider to after checking if the module is disabled. Disabled modules may not have all the state necessary to generate the data. Test: m -j libLLVM Change-Id: Iab27a26e604f3810bcc2d9f61b1839aa7bc428b4
* Add basic VNDK support in SoongDan Willemsen2016-11-282-0/+8
| | | | | | | | | | | | | | | | | | 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
* genrule: support deps filesColin Cross2016-11-221-0/+6
| | | | | | | | If a genrule sets deps_file: true, use a file in the gen directory as a GCC-style deps file. Test: m -j libLLVMObject Change-Id: Id410165847e4eaea1853a392512e38787c431523
* genrule: expand $$ to $$Colin Cross2016-11-222-5/+5
| | | | | | | | An escaped $ sign in an expanded string needs to be re-escaped so it can pass through to ninja. Test: m -j libLLVMObject Change-Id: I2f7890417fd6f534e6e21cace3d86ae9ef708ce5
* Add LinuxBionic OsTypeDan Willemsen2016-11-171-9/+11
| | | | | | | | Actual support will come in later changes. Bug: 31559095 Test: out/soong/build.ninja is identical Change-Id: I31392fb78a51f43567d16aef89e32cd5137cdbc1
* Encode default enabled state in OsTypeDan Willemsen2016-11-172-6/+10
| | | | | | | | | Currently our only default-disabled Os is Windows since it's HostCross, but we'll be adding non-default Host and Device types in the future. Bug: 31559095 Test: out/soong/build.ninja is identical Change-Id: I2bc3a3cc76f2c95ea040bc34ba6706fcc178c68d
* 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
* Fix the Platform_sdk_version default.Dan Albert2016-11-101-1/+1
| | | | | | | | | | N has merged into aosp now. Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \ build/soong/scripts/build-ndk-prebuilts.sh Bug: None Change-Id: I2685c700e2cb138708a3e8a5f51281c30fb582db
* 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
* Support genrules with multiple toolsColin Cross2016-11-071-3/+1
| | | | | | | | | | | | | | | To allow genrules with more than one tool, rename the tool property to tools and make it an array, replace $tool with $(location <label>), and use $() for other variables for consistency. Also remove the host bin directory from the genrule path, and the $srcDir variable, using either of them would have caused dependency issues. Bug: 31948427 Test: compare build.ninja Change-Id: Icf6d3bce2bea00fec1363fd65c0bdf96d09281bf (cherry picked from commit de6bd86d240b98b7ea7ff6a0454a13edc639a163)
* Add android.ExpandColin Cross2016-11-042-0/+225
| | | | | | | | Add android.Expand to expand $() variables in properties. Test: expand_test Bug: 31948427 Change-Id: Id30856a1d21d02e8997fcf2358e4a5feeede05be
* Move globbing to BlueprintColin Cross2016-11-044-163/+17
| | | | | | | | | | | | Move Soong's globbing-with-dependencies support into Blueprint so it can be used for subdirs= lines in Android.bp files. Blueprint has a slight change in behavior around subname= lines, it now always uses the subname and doesn't fall back to Blueprints. To support the Blueprints files in build/blueprint, use them directly with build=. Test: build, add source file that matches glob, rebuild Change-Id: Ifd0b0d3bc061aae0a16d6c7ca9a1cd8672656b4d
* Add support for Implicit OutputsDan Willemsen2016-11-031-17/+23
| | | | | | Test: mmma -j system/tools/hidl Test: Inspect out/soong/build.ninja before/after Change-Id: I8e91a033342a12302d51358c5be244e32ad689d7
* 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
* Merge changes from topic 'genpath_yacc'Dan Willemsen2016-11-031-8/+8
|\ | | | | | | | | | | * changes: Add yacc generated headers to the include path Add subdir to GenPath
| * Add subdir to GenPathDan Willemsen2016-11-021-8/+8
| | | | | | | | | | | | | | | | | | We were emulating this for proto files, standardize it and make the other generators use it as well. Test: Compare out/soong/build.ninja before/after change Test: mmma -j system/tools/hidl Change-Id: I1888c7b981749060a398387bbb9b481270bf6d75
* | Support sanitizing a single device archColin Cross2016-11-022-10/+9
|/ | | | | | | | | | | | 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-312-0/+14
| | | | | | | | | | | | | | | | 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 Path.Base helperColin Cross2016-10-271-1/+8
| | | | | | | Add Path.Base to return the basename of a Path object. Test: builds Change-Id: I2bf1519dc5039bedb1586e7ec18297a293e32e11
* Merge "Add a "license" property to ndk_headers."Treehugger Robot2016-10-202-1/+9
|\
| * Add a "license" property to ndk_headers.Dan Albert2016-10-202-1/+9
| | | | | | | | | | | | | | | | This field points to the license file for the headers being shipped. Test: make ndk && less $SOONG_OUT/ndk/NOTICE Bug: None Change-Id: I386f4e6f6d9776f422ffc09b8dab69e1911b08a4
* | Add an NDK ABIs mega build configuration.Dan Albert2016-10-192-9/+32
|/ | | | | | | | | | 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
* Allow brillo cflags and debuggable cppflagsDan Willemsen2016-10-171-1/+3
| | | | | Test: mmma -j frameworks/native/{libs/gui,opengl/libs} w/Android.bp Change-Id: I31286c92ec4befaa486052ba2e6d55cd0d5fe62d
* Re-enable prebuilt_testColin Cross2016-10-142-5/+40
| | | | | | | | | | | 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-136-5/+362
| | | | | | | | | | 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