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
Add support for all-aidl-files-under, all-Iaidl-files-under,
and all-logtags-files-under to android.mk
Test: manual
Change-Id: I5e187e0c5f9d1c63c8632f84ab47665ba85a5678
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
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
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
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
That's automatically implemented now by the finder
Bug: b/37748825
Test: m -j nothing # which runs unit tests
Change-Id: Ie17907733a744dc97cd24c90bed73b4731e878ad
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
For consistency with make, rename java resources to
java_resource_dirs and android resources to resource_dirs.
Test: m -j checkbuild
Change-Id: Ie9aac50fef40f6a9093b4b98759e79cd086bb797
Java prebuilts are now java_import, and add support for java_version
properties.
Test: m -j checkbuild
Change-Id: Ieae59efb3370f1370f82fc3672facbbb98205c68
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 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
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
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
Now it converts to:
aidl: {
include_dirs: [
"...",
]
}
Bug: 37747936
Test: run androidmk against an Android.mk file having LOCAL_AIDLE_INCLUDES
Change-Id: If9f4c3ee9969610f1e0e0f147ee6a70102b63edc
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
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
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
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
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
Add a test_suites property that is passed through to make as
LOCAL_COMPATIBILITY_SUITES.
Test: m -j checkbuild, examine out/soong/Android-${TARGET_PRODUCT}.mk
Bug: 35394669
Change-Id: If05b0f5f7d6dd85228546123bebe32859bcc8186
Support owner properties in Android.bp files and propagate the value
to make using LOCAL_MODULE_OWNER.
Bug: 36413696
Test: builds
Change-Id: Iac1cf7f2a14c9e3e6d85d6e09d5adb08a7078d00
Also somewhat consolidate the way in which properties are converted
Bug: 34671474
Test: make blueprint_tools
Change-Id: Idf0d6d63b8539ab6e514a6043d1f88836899864b
And support the reverse translation in androidmk.
Test: Use a cc_library_headers using LOCAL_HEADER_LIBRARIES in make
Test: androidmk with LOCAL_HEADER_LIBRARIES
Test: androidmk with soong's Android-*.mk file for BUILD_HEADER_LIBRARIES
Change-Id: I17adedb62151f62e67e2168b09ad87f1d5648df6
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
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
.proto files are translated to .pb.cc and .pb.h files, which are then
compiled normally.
Bug: 32286026
Test: mmma -j system/extras/perfprofd
Change-Id: I538071424d667aacf35b4b8bfebe217f5f092726
This only applies to shared libraries on the device, and like stripping,
we'll let make do the actual packing if we're embedded in Make.
Change-Id: I1585d74ecfc41e18dcbb5ffb70005adf007cc941
This only translates the common case using $(LOCAL_PATH). If it doesn't
match here, Soong will throw an error with a suggested fix.
Change-Id: If64c8fca008a1a414fc12389e6b1bb40af0df899
Generalize the list splitting function used by include_dirs and
export_include_dirs to also support splitting sources.
Change-Id: I11b8f817fb32309511522074fe6b26052ae3d65f
Improve the androidmk makefile parser based on ideas from go/ast and
friends:
- Use type switching instead of the As* mess
- Don't store endPos for every node, compute it based on the last
known position in the node plus the length of the last token
- Store positions as only the offset into the file, and then unpack
them into Line/Column scanner.Position objects later
Change-Id: I87eb6661859951e6c2ea5a85db6229fa5561d615
Track the position in the input makefile and output blueprint file
separately. When parsing a new makefile line, increment the line in the
output position by the number of lines between the end of the last
makefile line and the beginning of this line. Any extra blank lines
will be discarded by the blueprint printer.
Change-Id: I85c6e006667b5733b15e03b56b91caf29fbc0ea0
LOCAL_*_x86_64 was sometimes recognized as a _64 suffix and other times
as the correct _x86_64 suffix, based on the random order of the
propertyPrefixes map. Replace the map with a slice so that the ordering
is consistent, and ensure 64 as after x86_64.
Change-Id: I1a4b4959f8ef4273ad4a1cdd0672ad557bf1891e
Allow variables to have a prefix, for example "target.arm.cflags".
Each prefixed name separated by a "." will become a nested map
property.
Change-Id: Ib982b8dcaf2f1dc919acb2767e769950916c50f7
Sort LOCAL_INCLUDE_DIRS values into local_include_dir include_dirs based
on whether they are prefixed with $(LOCAL_PATH)/, and strip $(LOCAL_PATH)/
from export_include_dirs.
Change-Id: I20f9f0f8385088660855c7ccf85b7933ff2dcd44
Support specifying an install path relative to the default install
path for cc libraries and binaries.
Change-Id: I47a97de9beaedde27d99c498c3f26c9d36358d94
Add support for running aapt to generate R.java and Manifest.java,
compiling java into jar, adding resources to the jar to convert it
into an apk, signing the apk, and zipaligning the apk.
Change-Id: I7a73fef590d07f35b3d0b56a8571780c09bb10ae
Java vs. Android resource directories are already confusing enough,
rename resource_dirs to java_resource_dirs to make room for
android_resource_dirs.
Change-Id: Iffd087860b98df29e81d8d2f823be87c8227e614
Add support for aidl files listed in srcs for java builds, and
an aidl_preprocess module type for framework and sdk aidls.
Change-Id: I3aa537f4483822e5b534c74d0b35f13a938f8947
Add support for yacc (.y or .yy) and lex (.l or .ll) files. Also
tweak locations of .o files for normal and generated sources to
makes sure they don't collide.
Change-Id: I03172cddbdc022525bf392a81d72050406b8cdb3
Add support for compiling java libraries (.jar files with
or without .dex), java binaries (.jar files with a wrapper
script to run them), and java prebuilts (for the SDK .jars)
Change-Id: Id624da64c92cf20c6d9577c6bb06e5b212af0d1b
Some Android.mk files use BUILD_OS instead of HOST_OS for selecting
options when building host tools.
Change-Id: Ic4869cdee01da050364bb21b47f3de8fd8adaa96
Initial build logic for building android with soong. It can build
a variety of C and C++ files for arm/arm64 and host.
Change-Id: I10eb37c2c2a50be6af1bb5fd568c0962b9476bf0