aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
Commit message (Collapse)AuthorAgeFilesLines
* Fix androidmk converting cc librariesDan Willemsen2018-05-071-0/+13
| | | | | | | | | | | The java library rewrites should only happen for java modules, not cc modules. Bug: 79272000 Test: Ran androidmk on a number of Android.mk files Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1 Merged-In: Ife2cfb5a69d7db37216671f08317033b99fcd3a1 (cherry picked from commit 75dec2291b73995ca4d4ddb1b828dfce7f959043)
* Fix androidmk_test.go import orderingColin Cross2018-05-031-1/+2
| | | | | | | | Bug: 73724997 Test: m checkbuild Change-Id: I9fb94f22a157ffb9369eea071a867289c37cf026 Merged-In: I9fb94f22a157ffb9369eea071a867289c37cf026 (cherry picked from commit fdb084029fbca9cc1e4d449ee4957b171e6d4750)
* Add more androidmk translations for android librariesColin Cross2018-05-032-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. Bug: 73724997 Test: androidmk_test.go Change-Id: I3ad2a3561f69ebd097eca97cb170754d64e06123 Merged-In: I3ad2a3561f69ebd097eca97cb170754d64e06123 (cherry picked from commit 2dee86d69cf51b38e8b0afac2e8b47ab77380fac)
* Merge matching properties in bpfixColin Cross2018-05-031-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. Bug: 73724997 Test: bpfix_test.go Change-Id: I30955b6efbb767c02ba77f2f18d44951ef094bad Merged-In: I30955b6efbb767c02ba77f2f18d44951ef094bad (cherry picked from commit 9c55d237f6b72896209344aee18a1702c2f9ac3e)
* Make bpfix not modify the input treeColin Cross2018-05-031-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. Bug: 73724997 Test: bpfix_test.go Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63 Merged-In: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63 (cherry picked from commit adee968a4bace28bd26253bc436043eb513f6117)
* Fix format string issuesColin Cross2018-05-031-2/+2
| | | | | | | | | | Fix issues caught by go vet. Bug: 73724997 Test: m checkbuild Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084 Merged-In: Ib8d740457c15432dabe1575a6707726ddaf93084 (cherry picked from commit f46e37f5f79bd7111aed84f6cf172f20431ec010)
* Add overrides to cc_binaryYifan Hong2018-04-031-0/+1
| | | | | | | | Test: use it for healthd, it is not installed. Bug: 77541952 Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447 Merged-In: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
* 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
* Rename resource_dirs to java_resource_dirsColin Cross2017-09-271-1/+1
| | | | | | | | For consistency with make, rename java resources to java_resource_dirs and android resources to resource_dirs. Test: m -j checkbuild Change-Id: Ie9aac50fef40f6a9093b4b98759e79cd086bb797
* androidmk suport for aidl includes using LOCAL_PATHJeff Gaston2017-09-122-1/+23
| | | | | | Bug: 62882283 Test: m -j blueprint_tools # which runs unit tests Change-Id: I6708aa21eada660a1f01759f090084692baa8937
* Refactor proto in preparation for java proto supportColin Cross2017-09-111-0/+10
| | | | | Test: m -j checkbuild Change-Id: Idf00ea0bacb2777458f9af2c7eb47e1e1854eeba
* Add support for java annotation processorsColin Cross2017-09-061-0/+3
| | | | | | | Add annotation_processor and annotation_processor_classes properties. Test: m -j checkbuild Change-Id: I41a6cd42f0c048070a99cb18af150030170498f7
* Update java androidmk conversionsColin Cross2017-09-061-1/+2
| | | | | | | | Java prebuilts are now java_import, and add support for java_version properties. Test: m -j checkbuild Change-Id: Ieae59efb3370f1370f82fc3672facbbb98205c68
* Support non-installable java librariesColin Cross2017-09-051-13/+26
| | | | | | | | | Some java libraries will never be installed, support an installable: false property and export it back to make as LOCAL_UNINSTALLABLE_MODULE := true. Test: m -j checkbuild, manually inspect out/soong/Android*.mk Change-Id: I825ec897648c82fb7323da7df3539c9aaa6bcfce
* Add notice property to all modulesColin Cross2017-09-011-0/+1
| | | | | | | | Add a notice property to all modules which, if set, propagates to LOCAL_NOTICE_FILE in make. Test: m -j checkbuild, examine out/soong/Android*.mk Change-Id: I565a5624dfd7b376b976b1a43dac5cea96869026
* Rename no_standard_libraries to no_standard_libsColin Cross2017-08-311-1/+1
| | | | | | | | For consistency with libs and static_libs. And make it a *bool so that it can be overriden when used in java_defaults modules. Test: java_test.go Change-Id: If0eaf5d5571dc6e565056d273b0addd960d6b33f
* Fix crash when running androidmk against frameworks/base/Android.mkJeff Gaston2017-08-242-2/+7
| | | | | | | | | | | The was a variable on the right-hand side of the assignment to LOCAL_MODULE_CLASS , which wants a non-nil scope Bug: 64266643 Test: androidmk frameworks/base/Android.mk Test: androidmk prebuilts/misc/common/ddmlib/Android.mk Change-Id: I52d33f5e5cb1179f84d4df149ef804268d67f7fb
* Consolidate localIncludeDirs and exportIncludeDirsJeff Gaston2017-08-241-43/+31
| | | | | | | | in preparation to have LOCAL_AIDL_INCLUDES work similarly Bug: 62882283 Test: m -j Change-Id: I5df3d5ac2eac43d839440c291d4cdc0e26172dfa
* Fix androidmk crash if no CLEAR_VARS is detectedJeff Gaston2017-08-172-4/+34
| | | | | | Bug: 38459493 Test: make blueprint_tools Change-Id: I968a2e46160c6c04091412e6d5450f9917ec8b67
* androidmk no longer escaping escaped quotes in CFLAGSJeff Gaston2017-08-153-1/+38
| | | | | | | Bug: 37547491 Test: m -j Change-Id: I2f406be477f3990bf109778eb9adc9c33db2f2ad
* Rename java module and property names for consistencyColin Cross2017-07-191-3/+3
| | | | | | | | | | | | prebuilt_java_library -> java_prebuilt_library prebuilt_sdk -> android_prebuilt_sdk java_resource_dirs -> resource_dirs exclude_java_resource_dirs -> exclude_resource_dirs java_libs -> libs java_static_libs -> static_libs Test: java_test.go Change-Id: Icb0eefa6663844e20ad0a8729fb2c90ec916c3eb
* Revert "Revert "Run bpfix at the end of androidmk""Jeff Gaston2017-06-192-2/+13
| | | | | | | | | Bug: 38351765 Test: androidmk Android.mk > Android.bp This reverts commit eb3186abbe1c353c77d38be1f16720940f6925d5. Change-Id: I0b67e89f5096aae60c97eb6af4fd205509aac5c9
* Revert "Run bpfix at the end of androidmk"Jeff Gaston2017-05-262-13/+2
| | | | | | | | This reverts commit 7fd905ae26ac2cb9333a81feb928df339c5b4bc4. Reason for revert: postsubmit build broken Change-Id: Iddff17616c7307918380e15c1ed69ee5625a6c8e
* Run bpfix at the end of androidmkJeff Gaston2017-05-242-2/+13
| | | | | | Bug: 38351765 Test: androidmk Android.mk > Android.bp Change-Id: Iefcae1b01f4e915ec20782b302ba4350a20d0f1a
* Support for LOCAL_AIDL_INCLUDES in androidmkJeff Gaston2017-05-151-1/+1
| | | | | | | | | | | | | Now it converts to: aidl: { include_dirs: [ "...", ] } Bug: 37747936 Test: run androidmk against an Android.mk file having LOCAL_AIDLE_INCLUDES Change-Id: If9f4c3ee9969610f1e0e0f147ee6a70102b63edc
* androidmk: support cfi, diag, and misc_undefined propertiesColin Cross2017-05-082-66/+46
| | | | | | | | | | | | Support more sanitize related properties. Also remove integer, since it isn't a supported property, and rewrite it to be deterministic by not going through splitBpList. This reapplies Ie8fba06c36fc121912c65a77ee495ceef4962df0. Bug: 37547301 Test: androidmk_test.go Change-Id: Id637ffdb7d36bed8a2c2fe76bd6f54662709e3b3
* Revert "androidmk: support cfi, diag, and misc_undefined properties"Colin Cross2017-05-082-58/+50
| | | | | | This reverts commit a8688c465294dc0016c56855922238527d36cc1b. Change-Id: Ida4050f3ddc8303d614f2bd2a01470ed5459fe2c
* androidmk: support cfi, diag, and misc_undefined propertiesColin Cross2017-05-082-50/+58
| | | | | | | | Support more sanitize related properties. Bug: 37547301 Test: androidmk_test.go Change-Id: Ie8fba06c36fc121912c65a77ee495ceef4962df0
* Add a variable to disable modules in the PDKColin Cross2017-05-051-2/+5
| | | | | | | | Not plumbed through yet, but will at least prevent us from losing track of which modules will not build in the PDK. Test: builds Change-Id: I4c1a0e39104b104dc1ff23c4391d5e83b3002d3a
* Support .rs and .fs files in cc_* module srcs listsColin Cross2017-05-051-15/+18
| | | | | | | Translate .rs and .fs files to .cpp files using llvm-rs-cc. Test: builds Change-Id: I242cea0d09c9985730a512cec7705c3f1479f4ed
* Implement vendor as a synonym of proprietaryDan Willemsen2017-04-071-1/+3
| | | | | | | | | | | | The vendor image will have more than just proprietary modules in it under Treble, so let's stop marking open source code as proprietary just to move it to vendor. Bug: 36452052 Bug: 37134596 Test: compare build.ninja before/after, no changes. Test: Set vendor: true, ensure it works. Change-Id: I44b0ec7007d0e311bdcbd44b238b1ef2d05cc6ff
* Support prebuilt module typesPo Hu2017-03-311-2/+23
| | | | | | | | | | | Now BUILD_PREBUILT should be converted into corresponding types like cc_prebuilt_library_shared/cc_prebuilt_library_static ... So change to check LOCAL_MODULE_CLASS in Android.mk to determine module types, and eliminate class property from Android.bp which will cause a build break. Change-Id: If865cc865f360eac7cc77f060df5a310bada6900 Test: out/soong/host/linux-x86/bin/androidmk prebuilts/misc/common/ddmlib/Android.mk
* Rework vndk detectionDan Willemsen2017-03-291-1/+0
| | | | | | | | | | | | | | Instead of having a module define `use_vndk: true`, assume that we're building with the VNDK if we're installed on the vendor partition, and BOARD_VNDK_VERSION==current. This now matches our behavior in Make. Once BOARD_VNDK_VERSION!=current, we'll need to disable modules that need to otherwise compile against the VNDK, since we can only compile against the current VNDK. Test: build.ninja for aosp_arm is the same before/after Test: Ensure there are no boards that set BOARD_VNDK_VERSION Change-Id: If937fa7bdb119648137af52daebadf486163484b