aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
Commit message (Collapse)AuthorAgeFilesLines
* Implement vts_config moduleSasha Smundak2019-02-193-17/+50
| | | | | | | Test: internal (see android/vts_config_test.go) + run 'm vts' and check that host/linux-x86/vts/android-vts.zip remians the same Change-Id: I0249a974a240e7669c3b9378c17739df8e120873 Fixes: 122617100
* Add support for use_embedded_dex in SoongColin Cross2019-02-081-0/+1
| | | | | | | | | When use_embedded_dex is set, store the dex uncompressed in the APK and set the android:useEmbeddedDex="true" attribute in the manifest. Test: m checkbuild Change-Id: Iea6e7ed19599830ac72392ef93f9c98957df1cce
* Make manifest and APK agree on uncompressed native libsColin Cross2019-02-081-0/+1
| | | | | | | | | | | Only put uncompressed native libs in an APK if the min_sdk_version supports it (>= 23, Marshmallow), and set android:extractNativeLibs="false" in the AndroidManifest.xml so that the platform won't extract them anyways. Bug: 117618214 Test: m checkbuild Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
* Convert BUILD_PREBUILT with LOCAL_MODULE_CLASS=ETC to prebuilt_etcSasha Smundak2019-01-242-1/+255
| | | | | | | | | | | | The conversion is a two-step process: first, when processing BUILT_PREBUILT, convert LOCAL_SOURCE_PATH to a variable reference+fixed subpath path in the blueprint AST. Then, set various boolean flags depending on variable being referenced. androidmk_test.go has a test for each handled case. Change-Id: Iabd18d5f8645ca7077536863cd6640df5b24d24a Fixes: 122906526 Test: treehugger
* Translate LOCAL_ANNOTATION_PROCESSORS to java_pluginColin Cross2019-01-242-2/+20
| | | | | | | | | | | The annotation_processors property is deprected, translate LOCAL_ANNOTATION_PROCESSORS to plugins instead. Also remove LOCAL_ANNOTATION_PROCESSOR_CLASSES properties, they are retrieved from java_plugin dependencies instead. Bug: 77284273 Test: androidmk_test.go Change-Id: If6f6177262d5579e03bae58d9eb54a599e3da786
* Add BUILD_CTS_* to androidmkDan Willemsen2019-01-152-0/+60
| | | | | | Bug: 122617736 Test: new unit tests Change-Id: Ibce6b4bbe49015a1ca6cf88cd43badc6b5cc078e
* Handle Jacoco filtersSasha Smundak2019-01-092-0/+12
| | | | | Test: treehugger Change-Id: I8bf242cdb4709d086ff0806c143ff03ad2e5cd30
* Make androidmk translate LOCAL_32_BIT_ONLYAnton Hansson2019-01-091-0/+15
| | | | | | | Translate LOCAL_32_BIT_ONLY := true to compile_multilib: "32". Test: androidmk frameworks/av/services/mediadrm/Android.mk Change-Id: I9f73f5fdfc67738286844ff42b39ee54403fe649
* Handle multi dir all-*-files-under function calls.Jaewoong Jung2019-01-094-26/+53
| | | | | | | | This change fixes a bug where androidmk assumes all-*-files-under function only takes one directory parameter. Test: androidmk_text.go, manual execution Change-Id: Ib1614a2ddde7ea1120c1c37126231988f4862165
* Add LOCAL_OVERRIDES_PACKAGES support to androidmk.Jaewoong Jung2019-01-071-0/+1
| | | | | | | It is supposed to be translated to overrides. Test: Manual test Change-Id: Ice2e7c5f7669ad1e4c3e82000c8dd52d20a49a7a
* Add `aapt_include_all_resources`Dan Willemsen2018-10-291-18/+19
| | | | | | | The equivalent of Make's LOCAL_AAPT_INCLUDE_ALL_RESOURCES. Test: build LatinIME with Soong Change-Id: Ib76bea5f28e365b59fa9477b9bceabb84012ff8e
* Fix how soong converts LOCAL_STRIP_MODULE.Jaewoong Jung2018-10-152-1/+65
| | | | | | | | | It should be translated to a poperty map with one entry, not a string value. Bug: 74083867 Change-Id: Ida659749a63e67eb55184e7c79959f57b8549dad Test: androidmk_test.go
* Add support for android_app_certificate modulesColin Cross2018-10-081-0/+1
| | | | | | | | | | Some android_app modules need certificates located outside their directory. Instead of requiring paths from the root of the tree, add an android_app_certificate module that exports the certificate files. Test: m checkbuild Change-Id: Icbf3898894f3eb857e2d907e3e58dd072c6fabe9
* Add support for JNI libraries to android_app modulesColin Cross2018-10-081-0/+1
| | | | | | | | | | | Make android_app modules a MultiTargets module, which means the common variant will have a list of Targets that it needs to handle. Collect JNI libraries for each Target, and package them into or alongside the APK. Bug: 80095087 Test: app_test.go Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
* Add support for /product-services partitionDario Freni2018-07-191-0/+1
| | | | | | | | | This is an adaptation of Icc4f8c16bc389fe20db680849f311d02df1299c3, to support modules that are installed on the /product-services partition. Bug: 80741439 Test: m -j both with and without enabling the new partition Change-Id: I72b335ad38baff5848cd3da7489343f8cf98ff16
* Translate java libraries to java_libraryColin Cross2018-07-112-5/+47
| | | | | | | | | | 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
* Add support for min_sdk_versionColin Cross2018-07-091-0/+1
| | | | | | | | | | | 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
* Add support for android_test modulesColin Cross2018-05-241-0/+27
| | | | | | | | | android_test module are APKs that can be run as tests, either as standalone unit tests or as instrumentation tests for another APK. Test: m checkbuild Change-Id: I16661701637e4048fd99442029c3e195ebf373a4
* Support platform_apis propertyColin Cross2018-05-221-0/+2
| | | | | | | | | Add a platform_apis property. The logic to verify it isn't hooked up yet, but this will allow translating modules to Soong without losing the annotation. Test: m checkbuild Change-Id: I75ff2d7b94247873f5bb1547a9b347a8e73c3191
* Fix optimize.proguard_flags_files typoColin Cross2018-05-221-1/+1
| | | | | | | | LOCAL_PROGUARD_FLAG_FILES should convert to optimize.proguard_flags_files, not optimize.proguard_flag_files. Test: m checkbuild Change-Id: I1471afc006a2a3892af37d2cb73c51636f05d7f7
* Remove the unused `tags` propertyDan Willemsen2018-05-151-2/+36
| | | | | | | | And fix up androidmk / bpfix to provide warnings about what to do instead. Test: m blueprint_tools (runs the tests, ensures there aren't any tags left) Change-Id: I1a3ad8600211050420041740207d6957f44463c8
* Merge changes I52f88bfd,I4263b7d5android-build-prod (mdb)2018-05-086-8/+225
|\ | | | | | | | | | | * changes: Fix usage of bytes.NewBuffer in bpfix Add a dependency fixer for proto deps
| * Add a dependency fixer for proto depsDan Willemsen2018-05-076-8/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | protoc dependency files, at least for C++ outputs, uses the form of: a/b.c \ a/b.h: <dep1> <dep2>... Ninja will fail the command when it parses a dep file and there's more than one output file (even though it doesn't care what the output file name is). So this tool will parse the original file, and output a version with only a single output file. Bug: 67329638 Test: NINJA_ARGS="-t deps ...pb.c" m Test: NINJA_ARGS="-t deps ...srcjar" m Test: NINJA_ARGS="-t deps ...srcszip" m Test: Run dep_fixer across all of taimen's dep files, no failures. Test: Run dep_fixer against the processed files, no changes. Test: Run androidmk across all of our Android.mk files, inspect the diffs Change-Id: I4263b7d5faea37285afa6b24dedf5964aa7d19dc
* | Fix androidmk converting cc librariesDan Willemsen2018-05-051-0/+13
|/ | | | | | | | The java library rewrites should only happen for java modules, not cc modules. Test: Ran androidmk on a number of Android.mk files Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
* Fix androidmk_test.go import orderingColin Cross2018-04-161-1/+2
| | | | | Test: m checkbuild Change-Id: I9fb94f22a157ffb9369eea071a867289c37cf026
* Add more androidmk translations for android librariesColin Cross2018-04-162-0/+66
| | | | | | | | | | | | | | | Add support for translating LOCAL_MANIFEST_FILE, LOCAL_RESOURCE_DIR LOCAL_SHARED_ANDROID_LIBRARIES, and LOCAL_STATIC_ANDROID_LIBRARIES. Use the presence of non-empty LOCAL_RESOURCE_DIR, LOCAL_SHARED_ANDROID_LIBRARIES or LOCAL_STATIC_ANDROID_LIBRARIES to convert a java_library_static into an android_library module, and then squash LOCAL_SHARED_ANDROID_LIBRARIES into LOCAL_SHARED_LIBRARIES and LOCAL_STATIC_ANDROID_LIBRARIES into LOCAL_STATIC_LIBRARIES. Test: androidmk_test.go Change-Id: I3ad2a3561f69ebd097eca97cb170754d64e06123
* Merge matching properties in bpfixColin Cross2018-04-161-21/+5
| | | | | | | | | androidmk will start to generate multiple static_libs: properties in a single module, add a pass in bpfix to fix them up into a single property. Test: bpfix_test.go Change-Id: I30955b6efbb767c02ba77f2f18d44951ef094bad
* Make bpfix not modify the input treeColin Cross2018-04-161-1/+2
| | | | | | | | Make a new object called Fixer to hold the state of the tree, and make a copy of the input tree so the original doesn't get modified. Test: bpfix_test.go Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
* Add USE_CLANG_LLD and use_clang_lld.android-o-mr1-iot-preview-8Chih-Hung Hsieh2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | * USE_CLANG_LLD is unedefined in current builds. * When USE_CLANG_LLD is defined to 'true' or '1', use clang's lld instead of ld or ld.gold. * When lld is enabled: * ld-only flags are not passed to 'lld'. * location_packer is disabled. * Use new lld's --pack-dyn-relocs=android. * When lld does not work: * In Android.mk files use LOCAL_USE_CLANG_LLD := false. * In Android.bp files use use_clang_lld: false. * Only arm, arm64, x86, and x86_64_devices have LLD flags; all other hosts and targets do not call lld yet. Bug: 73768157 Test: make checkbuild and boot Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
* Add vintf_fragments.Steven Moreland2018-04-051-0/+1
| | | | | | | | | Bug: 66917623 Test: fragments are loaded in the right place Test: boot device which is depending on fragments Test: androidmk file which uses LOCAL_VINTF_FRAGMENTS properly converted Change-Id: I366b731cf8d5ecf51851866f441ff1c517da75cf
* Add overrides to cc_binaryYifan Hong2018-04-031-0/+1
| | | | | | | Test: use it for healthd, it is not installed. Bug: 77541952 Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
* Fix format string issuesColin Cross2018-03-281-2/+2
| | | | | | | Fix issues caught by go vet. Test: m checkbuild Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084
* Fix java_import and android_library_import conversionsColin Cross2018-02-221-0/+30
| | | | | | | | | | | | | | java_import and android_library_import modules can't be handled directly in androidmk because the results may depend on properties that haven't been parsed yet. Add a bpfix pass (which is automatically included at the end of androidmk) to select android_library_import vs. java_import based on the extension of the prebuilt file, and convert the srcs property to jars or aars as appropriate. Bug: 73724997 Test: androidmk_test.go Change-Id: I1024742e9e96d5e1e88c3cc139eeb0d5a2f6849b
* Don't pretend *parser.List is immutableColin Cross2018-02-221-2/+2
| | | | | | | | | | | | The functions in bpfix that take a *parser.List and return a modified *parser.List are always returning the same pointer and mutating the target of the pointer. Remove the extra unnecessary return value. Also extract the getLiteralListProperty function. Test: androidmk_test.go Change-Id: I08d8aff955c72b7916741cda8083974a49af4d6f
* Use product instead of oem for Product specific moduleJaekyun Seok2018-01-251-1/+1
| | | | | | | Bug: 64195575 Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE, BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION. Change-Id: Icc4f8c16bc389fe20db680849f311d02df1299c3
* Soong: support Errorprone javacflagsAndreas Gampe2018-01-232-0/+19
| | | | | | | | | | | | | | | | | Add support for an errorprone block in Java modules that accepts additional javacflags for the errorprone build. Sample: errorprone: { javacflags: ["-Xep:EqualsNaN:WARN"], }, Bug: 72004718 Test: m RUN_ERROR_PRONE=true Test: manual - add block with ERROR to a project Test: androidmk_test Change-Id: I502248fe76c26aa19102f413af72a7324c35b7f4
* Add R8 supportColin Cross2018-01-032-0/+94
| | | | | | | Add support for R8 to optimize apps and java libraries. Test: m checkbuild Change-Id: I2afd5d7a84912d3ab613c32c599bd1ebe60562e0
* Add [soc|device|product]_specificJiyong Park2017-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Added three properties (soc_specific, device_specific, and product_specific) that shows what a module is specific to. `soc_specific: true` means that the module is specific to an SoC (System-On-a-Chip) and thus need to be installed to vendor partition. This has the same meaning as the old `vendor: true` setting. `device_specific: true` means that the module is specific to the entire hardware configuration of a device includeing the SoC and off-chip peripherals. These modules are installed to odm partition (or /vendor/odm when odm partition does not exist). `product_specific: true` means that the module is specific to the software configuration of a product such as country, network operator, etc. These modules are installed to oem partition (or /system/oem when oem partition does not exist). These modules are assumed to be agnostic to hardware, so this property can't be true when either soc_specific or device_specific is set to true. Bug: 68187740 Test: Build. path_tests amended. Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
* Support more all-*-files-under functions in androidmkColin Cross2017-12-141-16/+12
| | | | | | | | Add support for all-aidl-files-under, all-Iaidl-files-under, and all-logtags-files-under to android.mk Test: manual Change-Id: I5e187e0c5f9d1c63c8632f84ab47665ba85a5678
* Add privileged app support in SoongColin Cross2017-12-141-0/+1
| | | | | | | | Allow apps to specify that they should be installed in priv-app, and export the value to Make which normally handles installation. Test: m checkbuild Change-Id: I79a05e7bb6ec0df5c31429e2f4592c6fd57dab70
* Split logtags implementations for cc and javaColin Cross2017-12-072-74/+1
| | | | | | | | | | | | | | | | Logtags files in cc and java are treated fundamentally differently. In cc, they are not used for compiling at all, but need to be passed to Make to be combined into the global logtags list, and logtag files are listed in a logtags property. In java they are listed in srcs and produce generated code that is compiled in, and so shouldn't also need to be listed in a logtags property. Move the logtags property to cc and export it to Make from there, and have java extract logtags files from srcs to be exported to Make. Test: m checkbuild Change-Id: I31d49289efe72db60d2f33566df771b4a3ebc8a0
* Add more dex_preopt propertiesColin Cross2017-12-061-1/+6
| | | | | | | | | Move dex_preopt to dex_preopt.enabled, and add dex_preopt.app_image, dex_preopt.profile_guided, and dex_preopt.profile. These values will be passed back to Make if provided to control dex preopting. Test: m checkbuild Change-Id: I54a4b1de697a08be20ab65d2a5dc43ce0046692d
* Allow building framework.jar and framework-res.apkColin Cross2017-11-291-0/+3
| | | | | | | | | | Update app support enough to build framework-res.apk, link framework.jar against its generated files, and export it to make. Bug: 69917341 Test: m checkbuild tests docs Change-Id: I7db29cd1f5fabb22e844483ecc7c38abfedbbe0a
* Have androidmk ignore all-makefiles-underJeff Gaston2017-11-283-1/+20
| | | | | | | | That's automatically implemented now by the finder Bug: b/37748825 Test: m -j nothing # which runs unit tests Change-Id: Ie17907733a744dc97cd24c90bed73b4731e878ad
* Add license headers to all go and shell filesColin Cross2017-11-178-0/+112
| | | | | Test: none Change-Id: I75c443e05f2b1e17fcb6823182717d2e6f5df7c4
* Merge "Add property to prevent dex preopting"Colin Cross2017-10-191-0/+1
|\
| * Add property to prevent dex preoptingColin Cross2017-10-191-0/+1
| | | | | | | | | | | | | | | | Add dex_preopt property and pass it through to make as LOCAL_DEX_PREOPT. Test: m checkbuild Change-Id: I6f19d097d1769068b7e4093f011574c540c137f3
* | Prevent androidmk crash on art/tools/ahat/Android.mkJeff Gaston2017-10-192-4/+51
|/ | | | | | | | | | | | | Because a directive can exist within a rule's recipe, there may not exist an ordering of nodes such that nodes[i].End() <= nodes[i+1].Start() This disables that assertion. Test: androidmk art/tools/ahat/Android.mk Bug: 67906386 Change-Id: I84ea6ebdbc01c1600b1fa188463aae56270f0135
* Add usage message to androidmkJeff Gaston2017-10-061-1/+15
| | | | | | Test: androidmk 2>&1 | grep usage && androidmk --help 2>&1 | grep usage && echo ok Bug: 67426255 Change-Id: I1e5033321c62c6744672f2ea435a422a4b9bd3da
* Change androidmk to use linux_glibc instead of linuxDan Willemsen2017-10-022-11/+11
| | | | | | Test: m blueprint_tools Test: androidmk system/core/fastboot/Android.mk Change-Id: I7003b86f16a522f01c826092b8e45603270aa391