Bug: 78133793
Bug: 78242072
Test: Builds when using cortex-a75 as a target.
Change-Id: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
Merged-In: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
(cherry picked from commit 0612597a41)
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28"). It will get copied
to compileSdkVersionCodename in APKs compiled against it.
Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Merged-In: I34a601cb2c14f66199066e7d598862108da0b950
(cherry picked from commit b691e24d89)
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28"). It will get copied
to compileSdkVersionCodename in APKs compiled against it.
Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Make builds handle modules with duplicate names in different
namespaces by passing a list of exported namespaces to Soong.
Soong-only builds can try to install both modules, leading to
a duplicate rule error. Re-use the same list of exported
namespaces in Soong, which will be empty in all existing
Soong-only builds. This will effectively only install modules
in the root namespace in Soong-only builds.
Test: m checkbuild
Bug: 79369665
Change-Id: Ie80d4b77e1dce165a33579fcf58b571989794b35
prebuilt_etc_xml installs an xml file to <partition>/etc[/<subdir>] and
validates the xml file against the given DTD file before installing it.
This change also includes some fixes for prebuilt_etc which is the super
module of prebuilt_etc_xml:
1) The module is changed to arch-specific module as the prebuilts are only
for devices (installed under the etc dir), but not for hosts.
2) Dependency to android.Prebuilt is removed because android.Prebuilt is
intended to be used for the case when a module can exist as prebuilts,
source or both. These prebuilt_etc_* modules are prebuilt only.
3) srcs property which accepts a list of source files is changed to src
that only accepts single source file, which makes more sense for
prebuilts.
Bug: 65686190
Test: m -j (xml_test.go)
Change-Id: I40484f3f6615b99f6b8d43176db0c40c5bfd838e
This commit adds `runtime_libs` to cc_binary and cc_library.
Similar to the `required` property, if a module specifies the
`runtime_libs` properties and it is installed, then the modules
specified in `runtime_libs` will be installed as well.
Differnt from the `required` property, if a module is using VNDK and the
module names specified in `runtime_libs` are resolved to the modules
with both core and vendor variants, then '.vendor' will be appended to
those module names.
For example, if `libb` is vendor_available and `libd` is a vendor lib,
then LOCAL_REQUIRED_MODULES will contain `libb.vendor` (instead of
`libb`).
Bug: 72343507
Test: lunch aosp_arm64_ab-userdebug && make # this runs the unit tests
Test: Create a vendor module with runtime_libs property to a
vendor_available shared library and check the generated Android.mk.
Change-Id: I9e245d80004dab597a5d3db5acd8a09117118db7
java_sdk_library is to make a Java library that implements optional
SDK APIs to apps. It is actually a wrapper for several modules: 1) stubs
library that clients are linked against to, 2) droiddoc module that
internally generates API stubs source files, 3) the real runtime shared
library that implements the API, and 4) XML file for adding the runtime
lib to the classpath at runtime if requested via <uses-library>.
Note: this is only the initial CL for the feature. Followings are features
currently missing and under development.
1) check for API consistency
2) install stubs libs as the dist artifacts
3) ensuring that apps have appropriate <uses-library> tag
4) disallowing linking to the runtime shared lib
5) HTML generation
Bug: 77575606
Test: m -j
Change-Id: I4a4ccf6e730e041703c63bb275d8860d0de96887
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last. Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.
Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
Merged-In: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
(cherry picked from commit a140bb05f1)
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.
Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Merged-In: I622eaf92f8a940f79007c2a579536da325700b06
(cherry picked from commit d09b0b653b)
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.
Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Bug: http://b/64121881
Bug: http://b/78188880
- Allow filegroup's properties to be extended by a LoadHook
- Support a filegroup (':module') in a prebuilt's 'Srcs' property to
export files from a different path as the prebuilt's sources.
This change also includes a refactoring that moves genrule/filegroup.go
to android/filegroup.go so that FileGroupFactory is visible in
prebuilt_test.go.
Test: Test
https://android-review.googlesource.com/c/platform/development/+/469159
in clang-tools branch on Linux, Darwin. Test regular build in
aosp/master.
Change-Id: I3ff6215ab2e62955f039fd1086c31f1bd50ebcf6
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last. Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.
Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.
I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):
SOONG_CONFIG_NAMESPACES += myPlugin
Within that namespace you can set key-value pairs:
SOONG_CONFIG_myPlugin := key1 key2 ...
...
SOONG_CONFIG_myPlugin_key1 := value
...
SOONG_CONFIG_myPlugin_key2 := true
Then in your plugin, you can ask for your namespace:
vars := ctx.Config().VendorConfig("myPlugin")
And then use them:
str := vars.String("key1")
if vars.Bool("key2") { ... }
if vars.IsSet("key3") { ... }
Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.
Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741
(cherry picked from commit 0fe7866897)
All access to these should be going through the methods on Config /
DeviceConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
(cherry picked from commit 45133ac184)
In preparation for unexporting ProductVariables, explicitly return a
pointer to the structure from TestConfig / TestArchConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
Merged-In: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
(cherry picked from commit 674dc7f7f0)
An upcoming change will stop exporting ProductVariables from Config, so
switch to using existing accessor functions, and add more when they're
missing.
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
Merged-In: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
(cherry picked from commit 3fb1faeeb9)
Instead of open-coding the logic of whether there is one, or where to
find it.
Bug: 76168832
Test: diff out/soong/build.ninja without dist
Test: diff out/soong/build.ninja with dist specified
Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300
Merged-In: Ia3f1ef335e2d6e2175343338d04867d778a50300
(cherry picked from commit bc0c509267)
So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
Merged-In: I8cb524b09a84d0b8357d7c3501c71270af411e17
(cherry picked from commit 54daaf0371)
Rename was expecting fully qualified names, but context.go always
passes it short names.
Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
Merged-In: I552ff39fd8ed6ba6da4262925060b45104840ff7
(cherry picked from commit eafb10c23a)
Rename was expecting fully qualified names, but context.go always
passes it short names.
Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
* 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
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.
I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):
SOONG_CONFIG_NAMESPACES += myPlugin
Within that namespace you can set key-value pairs:
SOONG_CONFIG_myPlugin := key1 key2 ...
...
SOONG_CONFIG_myPlugin_key1 := value
...
SOONG_CONFIG_myPlugin_key2 := true
Then in your plugin, you can ask for your namespace:
vars := ctx.Config().VendorConfig("myPlugin")
And then use them:
str := vars.String("key1")
if vars.Bool("key2") { ... }
if vars.IsSet("key3") { ... }
Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.
Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
All access to these should be going through the methods on Config /
DeviceConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
In preparation for unexporting ProductVariables, explicitly return a
pointer to the structure from TestConfig / TestArchConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
An upcoming change will stop exporting ProductVariables from Config, so
switch to using existing accessor functions, and add more when they're
missing.
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
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
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.
However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).
This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:
cc_library {
name: "libvendor",
proprietary: true,
...
}
vendor_public_library {
name: "libvendor",
symbol_file: "libvendor.map.txt",
}
This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.
Bug: 74275385
Test: m -j
Test: cc_test.go passes
Merged-In: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
(cherry picked from commit 374510bcb6)
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.
However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).
This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:
cc_library {
name: "libvendor",
proprietary: true,
...
}
vendor_public_library {
name: "libvendor",
symbol_file: "libvendor.map.txt",
}
This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.
Bug: 74275385
Test: m -j
Test: cc_test.go passes
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
We only define arm_on_x86 in the x86 code, but sometimes arm code needs
to know that it's working in the emulated mode, too.
Test: CtsRsCppTestCases
Bug: b/75971275
Change-Id: I99564fbe9aeb284e2f11ffb593b18536a7755ea5
(cherry picked from commit 5eb8ec1e72)
We only define arm_on_x86 in the x86 code, but sometimes arm code needs
to know that it's working in the emulated mode, too.
Test: CtsRsCppTestCases
BUG=75971275
Change-Id: I99564fbe9aeb284e2f11ffb593b18536a7755ea5
This commit allows VNDK extensions (vndk.enabled:true and vendor:true)
to reside under vendor/* or device/*. VNDK extensions will be installed
into /vendor/lib[64]/vndk[-sp]. It is reasonable for their source being
under vendor/* or device/*.
Bug: 74506774
Test: lunch aosp_walleye-userdebug && make # runs unit tests
Merged-In: I406c5bef10f5c549371dd978b8ecc16c65a7af4b
Change-Id: I406c5bef10f5c549371dd978b8ecc16c65a7af4b
RemoveFromList() should remove all matches. Before this commit,
RemoveFromList() only removes the first match. This commit rewrites
RemoveFromList() so that it will remove all matches. Besides, a unit
test is written.
Note: aosp/461936 wants to make sure libc.so precedes libdl.so in
DT_NEEDED entries. However, if there are two "libdl" in shared_libs,
aosp/461936 won't achieve its goal because RemoveFromList() (prior to
this commit) only removes the first "libdl".
Bug: 62815515
Test: Build sailfish and check libstagefright.so
Merged-In: I9bec563cbf800bff4bd508fb21e28869a92cfe56
Change-Id: I9bec563cbf800bff4bd508fb21e28869a92cfe56
This commit allows VNDK extensions (vndk.enabled:true and vendor:true)
to reside under vendor/* or device/*. VNDK extensions will be installed
into /vendor/lib[64]/vndk[-sp]. It is reasonable for their source being
under vendor/* or device/*.
Bug: 74506774
Test: lunch aosp_walleye-userdebug && make # runs unit tests
Change-Id: I406c5bef10f5c549371dd978b8ecc16c65a7af4b
Binder bitness does not always correlate directly with primary arch, as
assumed earlier. For example: it is possible to have devices with
primary arch 'arm' and use 64 bit binder.
Bug: 74362434
Test: utils/create_reference_dumps.py;
m -j vndk_package for aosp_arm64_ab, aosp_arm_ab invokes
header-abi-diff on both arm and arm64 arches.
Test: mm -j64 in system/libhwbinder on troublesome internal target.
Merged-In: Iea0a24b57cdb3033e25b6fe126c5d5d717f45b4e
Change-Id: Iea0a24b57cdb3033e25b6fe126c5d5d717f45b4e
(cherry picked from commit 34ce67d454)
Instead of open-coding the logic of whether there is one, or where to
find it.
Test: diff out/soong/build.ninja without dist
Test: diff out/soong/build.ninja with dist specified
Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300
So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).
Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
api-stubs, system-api-stubs and etc need generated sources and srcjars from "framework",
so add a property that tell module to fetch srcs and srcjars from its
dependency libraries. The libraries in that property has to be in the
module's classpath.
Also add doc_defaults targets.
Bug: b/70351683
Test: m -j
Change-Id: I05831fbcad488037710950e4f05dc8fb2a12f403
RemoveFromList() should remove all matches. Before this commit,
RemoveFromList() only removes the first match. This commit rewrites
RemoveFromList() so that it will remove all matches. Besides, a unit
test is written.
Note: aosp/461936 wants to make sure libc.so precedes libdl.so in
DT_NEEDED entries. However, if there are two "libdl" in shared_libs,
aosp/461936 won't achieve its goal because RemoveFromList() (prior to
this commit) only removes the first "libdl".
Bug: 62815515
Test: Build sailfish and check libstagefright.so
Change-Id: I9bec563cbf800bff4bd508fb21e28869a92cfe56
Binder bitness does not always correlate directly with primary arch, as
assumed earlier. For example: it is possible to have devices with
primary arch 'arm' and use 64 bit binder.
Bug: 74362434
Test: utils/create_reference_dumps.py;
m -j vndk_package for aosp_arm64_ab, aosp_arm_ab invokes
header-abi-diff on both arm and arm64 arches.
Test: mm -j64 in system/libhwbinder on troublesome internal target.
Change-Id: Iea0a24b57cdb3033e25b6fe126c5d5d717f45b4e
binder_size_t has a different size for builds with different primary
arches.
Also maintain seperate reference dumps for different arch variants,
since different cflags may be legally specified for them (similar to
what GSI does)
Test: create reference dump for libjpeg at
prebuilts/abi-dumps/vndk/current/arm64/arm64_armv8-a/source-based/libjpeg.so.lsdump.gz
mm -j64; header-abi-diff gets invoked.
Change-Id: I55eae4d4811c9754fe8dbd1009c7929fea119eeb
GlobFiles had allowed results to be anywhere in the source tree,
restrict it to results within the current module directory.
Then use it for ExpandSources and other places where we only want files.
This fixes using '*' in cc_test's `data` property, which can only
support files.
The only thing this changes today is that java_resource_dirs and
java_resources no longer pass directories to soong_zip's -f argument.
core-libart previously added some icu directories, now it only passes
files.
Bug: 71906438
Test: only expected changes in out/soong/build.ninja
Test: add data: ["**/*"] to a cc_test, build successfully
Change-Id: Iff1bd8c005a48e431c740706d7e23f4f957d8b1d
The error handling when opening config files was ignoring all errors
except ENOEXIST. Report other errors, instead of passing nil to
json.NewDecoder and getting:
config file: out/soong/soong.config did not parse correctly: invalid argument
Bug: 73951413
Test: touch out/soong/soong.config && chmod a-r out/soong/soong.config && m
Test: rm out/soong/soong.config && m
Change-Id: I4a609b7f060b760b76ee829b83c0eb405340f58f
* changes:
Use PathForSource instead of PathsForSource
Move AllowMissingDependencies check from PathsForSource to PathForSource
Pass nil instead of []string{} to ctx.Glob* functions
This reapplies Id7925999a27ea75a05e9301bbf1eb9f9a6bc4652 with
additional fixes to not use PathForSource in PathForModuleSrc.
PathsForSource was handling the AllowMissingDependencies case, but
PathForSource was not. Refactor PathForSource and
ExistentPathForSource, and add logic to PathForSource to fall back
to behavior similar to ExistentPathForSource when
AllowMissingDependencies is set.
PathForModuleSrc uses PathForSource, which causes too many
globs (>50k). The AllowMissingDependencies check doesn't make
much sense for PathForModuleSrc, since we already know the
project containing the definition of the module exists, we can
expect its local source files to exist. Use pathForSource and
do an manual existence check instead.
Test: paths_test.go
Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: If1690a708393964d3030cb908beaf7b6897c0084
This reverts commit 94a321045a.
Reason for revert: Broke builds with ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I9604887f796a79809ef8d6c741597796219dcaf3
Historically, we've always passed '-I .' as the first argument to
protoc, essentially treating all proto file package names as their full
path in the android source tree. This would make sense in a monorepo
world, but it makes less sense when we're pulling in external projects
with established package names.
So keep the same default (for now), but allow individual builds to opt
into using local paths as the default names with
'canonical_path_from_root: false'. A cleanup effort and/or large scale
change in the future could change the default to false.
As part of this, run protoc once per input proto file, since the flags
may need to change per-file. We'll also need this in order to specify
--dependency_out in the future.
Bug: 70704330
Test: aosp/master build-aosp_arm.ninja is identical
Test: aosp/master soong/build.ninja has expected changes
Test: m
Test: Build protobuf test
Change-Id: I9d6de9fd630326bbcced1c62a4a7e9546429b0ce
PathsForSource was handling the AllowMissingDependencies case, but
PathForSource was not. Refactor PathForSource and
ExistentPathForSource, and add logic to PathForSource to fall back
to behavior similar to ExistentPathForSource when
AllowMissingDependencies is set.
Test: paths_test.go
Change-Id: Id7925999a27ea75a05e9301bbf1eb9f9a6bc4652
The next patch will need to more complicated custom error handling,
so make validatePath return an error and let the caller handle it.
Test: paths_test.go
Change-Id: I4fe11c3f319303d779596709f4819e828b5bdb9b
Support Droiddoc to Soong based on core/droiddoc.mk. The non-std doclet
based droiddoc compilation output is a "real" stubs.jar instead of a
directory of java files and a timestamp file.
The std doclet based javadoc compilation output is a "empty" stubs.jar
instead of a timestamp file.
The stubs.jar will be exported to
out/target/common/obj/JAVA_LIBRARIES/$(LOCAL_MODULE)_intermediates/classes.jar
and out/target/common/docs/$(LOCAL_MODULE)-stubs.jar
A $(LOCAL_MODULE).zip file will be generated also, and is exported to
out/target/common/docs/$(LOCAL_MODULE)-docs.zip if property: installable is not set
to false.
Bug: b/70351683
Test: unittest + convert libcore docs Android.mk to Soong manually.
Change-Id: I1cffddd138a5d9d445f86a3d4a3fd4de88a2bc0f
(cherry picked from commit 78188ec622cb1ee24171455867fc58ffab91562e)
This reverts commit 606e9de344.
Reason for revert: <try to fix the broken build yesterday>
Change-Id: I2963b9af63c7c7398159e5e9a1e448266e1c81d5
Test: unittest
This variable can be set in BoardConfig.mk to specify a list of
additional paths that contain PGO profiles. These directories are
searched after the predefined paths in soong/cc/pgo.go while finding
PGO profiles.
Test: Set this variable in a BoardConfig and verify that such profiles
are found and that these paths are searched after the predefined paths
in soong/cc/pgo.go.
Change-Id: I0bb9523de614d0f23aba8d51c887d8fc8f41c993
The prebuilts and defaults mutators start adding some dependencies, so
for them to be able to reference imported modules, we need to
run the namespace mutator earlier.
Test: m nothing
Test: Try to use a global defaults module from a namespace
Change-Id: I6e853d20e32251d0fd33c8b2dcc26c0695b808fd
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
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.
The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.
Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.
When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).
Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: Id38f02b4be86710411be22bc28109e6894f8a483
Handle paths variable provided from Make about where integer overflow
sanitization should be enabled by default, and prepare to enable minimal
runtime diagnostics for integer overflow sanitizers in userdebug/eng builds.
This provides Soong support for on-by-default paths from Make for
integer overflow sanitization.
Bug: 30969751
Bug: 63927620
Test: Include paths passed from Make are being sanitized.
Test: Compilation succeeds with and without diagnostics enabled.
Test: See Make patch for further test notes.
Change-Id: I803a75646cc27ef5b4b5b74b8eb2981c39f8a6a3
This build function is unnecessary now that GCC is completely
unsupported for Android platform builds. It is similar to
USE_CLANG_PLATFORM_BUILD from the build/make side of things.
Bug: http://b/64032869
Test: Builds
Change-Id: Iddf5f91cc997c337c77a644265cb8dc4e5a915b4
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.
Test: build/soong/build_test.bash -only-soong
Change-Id: I4bd23babf567128d2d242cbdee3311abb198dd7c
This is cherry-picked from attempt 3, which was reverted
due to http://b/70862583.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests
(cherry picked from commit 13f23a2753)
Change-Id: I57abae73f9bdb21ef004a5118ff0e4ef70418ed9
Merged-in: Iac78122f58df0ebbb55134d55021ce6c57351b5f
This is cherry-picked from attempt 3, which was reverted
due to http://b/70862583.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Change-Id: Iac78122f58df0ebbb55134d55021ce6c57351b5f
Test: Treehugger
Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests
Add a method on ModuleContext and TopDownMutatorContext to visit
direct dependencies that have a given dependency tag.
Test: m checkbuild
Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.
This revert is being prepared ahead of time in case of
any problems with original change topic.
Bug: 69449021
Test: Treehugger
Change-Id: Idbaefeb5b88ecb5d5168e6b9b4a120f80dedd5b6
This is cherry-picked from attempt 2, which was reverted
due to http://b/70521453 and other issues.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests
(cherry picked from commit 13f23a2753)
Change-Id: I57abae73f9bdb21ef004a5118ff0e4ef70418ed9
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
We don't support armv5 any more, and we can't build bionic as armv5.
Test: build/soong/scripts/build-ndk-prebuilts.sh
Bug: https://github.com/android-ndk/ndk/issues/272
Change-Id: I4026d48e7d5db78f6aa4e9796da1ec9cf10021ca
Straightforward way of expressing policy inspired by a similar
syntax in SELinux.
Bug: 70165717
Test: no neverallows hit
Test: manually checking neverallow rules by changing them/adding violations
Change-Id: I7e15a0094d1861391bfe21a2ea30797d7593c142
The first include directory affects where protoc places the
output files. Ensure -I . is always the first protoc argument.
Bug: 70704330
Test: m checkbuild
Change-Id: I4992e4074f612409865e6e18dc8993c6f68385fd
This variable is being broken up because it isn't well
defined, and breaking it into smaller components makes
device bringup easier.
Bug: 62019611
Test: nothing uses it
Change-Id: I748958b7276f607f8a711289f3bde163a1a56596
If PLATFORM_VNDK_VERSION has a version $VER other than "current",
install current VNDK libs to /system/lib[64]/vndk[-sp]-$VER.
Otherwise, they will be installed to /system/lib[64]/vndk[-sp].
Bug: 69883025
Test: device boot
Change-Id: Ifa8564f39687dab5b407bf2178b13022625a94f3
Add a rule in soong that re-executes soong_build in order to
generate build documentation. This allows Soong to customize
the documentation.
Bug: 70516282
Test: m soong_docs
Change-Id: If143cfacd6ac20274cd7bb8d8fab0c07025a5553
Make the currently-unused SingletonContext.Rule match
ModuleContext.Rule and take a blueprint.RuleParams instead
of an android.RuleParams, and delete android.RuleParams.
Test: m checkbuild
Change-Id: I018685a3dc13f60825b5ba383ef365df2bc98dfc
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.
This revert is being prepared ahead of time in case of
any problems with CL topic:
https://r.android.com/#/q/topic:bug69449021_attempt2
Bug: 69449021
Test: Treehugger
Change-Id: I9ead8d569226bd487baee3c6d5be9ec7033eb56a
(This is cherry-picked from the first attempt to submit this CL
topic, which was reverted after 3 hours because of bug 70286093;
robolectric 3.{1.1,4.2} now stick with OpenJDK 8 to avoid that bug).
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: Running robolectric tests succeeds on internal-master
after cherry-picking this CL topic, using the command
line from http://b/70286093#comment1
(cherry picked from commit 0ae8b548af)
Change-Id: Ide6a7e55126d919a44f89ef8e0bd14fb12ff470e
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 a common_first multilib type and use it for java.Binary
so that the java part is compiled as a "common" arch type
but the wrapper script is installed as a "linux_glibc" arch
type. This allows java_binary to be used as a tool dependency
for a genrule.
Bug: 68397812
Test: TestJavaBinary
Change-Id: I809060839ce8878300da3fb76426ceb1ea6b0e8e
This allows TestModule.Output("foo") to be used to find
a file called "foo" that was installed using ctx.InstallFile.
Test: soong tests
Change-Id: I04833c9ee8ac5baa6b6afd35715d1191c1622a78
Debugging when writing tests using TestModule.Outputs is
unnecessarily hard, it panics when an incorrect output path
is given but doesn't provide any help to figure out why.
Follow the pattern used by TestContext.ModuleForTests
and print the list of valid output paths on failure.
Test: m checkbuild
Change-Id: I50e8e2dfc2070bd538d47cf6495a489f727b1564
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.
This revert is being prepared ahead of time in case of
any problems with original change topic,
https://r.android.com/#/q/topic:bug_69449021
Bug: 69449021
Test: Treehugger
This reverts commit 0ae8b548af.
Change-Id: Ief7646a94f1a264085cd299b4327d244b78a1537
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: "make core-oj", checked that compilation now uses
OpenJDK 9 javac -target 1.8
Test: Checked that this is still compiled using OpenJDK 8.
export EXPERIMENTAL_USE_OPENJDK9=false
make core-oj
Change-Id: Ic87e9bb2a2e5da0ff13a2e51845b5365901c1507