Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.
Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
However only allow it when they are merged from different defaults.
Extend the tests to cover that and other cases with visibilities in
defaults.
Also avoid dumping the whole visibility spec in the error message when a
visibility check fails, because it gets noisy for long visibility lists, and
can be confusing when //visibility:public gets merged with other visibility
rules.
Test: Soong self test
Bug: 112158820
Bug: 130796911
Change-Id: I242513975a3f824b9ea2eab5b94b194b9af2481b
Also remove an unused field in DefaultsModuleBase.
Test: m nothing
Test: Verify no diffs in ninja files:
<check out clean tree>
m nothing && shasum out/*.ninja | sort -k2 > before
<apply patch>
m nothing && shasum out/*.ninja | sort -k2 > after
diff before after
Bug: 112158820
Change-Id: Id819cea10f7af1603b4e4e1b14c0b49afcd0fecd
This fixes the problem with cc_object not having this suffix and
as a result overriding non-bridged variants for modules using mk files.
Bug: http://b/77159578
Test: build 4arch product
Change-Id: Ie958f997c6f54f93d8b2987ca5ba605004e1eb70
Ignore native_bridge targets when detecting whether second
architecture is translated or not.
The concept of second translated architectures is almost deprected
and will be removed once all affected products are switched to
native_bridge support from the build system.
Bug: http://b/77159578
Test: make 4arch target
Change-Id: Ife93ccc60f5c1a4020f66b2cf862b709889d9d6b
Only x86_64 darwin is supported, not x86. Don't create an x86
host arch when running tests on darwin.
Test: all soong tests
Change-Id: Ic12763298345e32a1340f8fbef338d2ab4d62b2e
A new module named prebuilt_font allows a set of fonts to be
installed in the /fonts system image.
Bug: b/123403785
Test: Wrote and ran unit test cases.
Change-Id: Icd468abe3d70a528b28a8d8f216407484e9966a7
This change fixes an issue where an android_test could not depened on an
override_android_app or an android_app overridden by one by moving all
override processing to post-deps and forwarding incoming dependencies on
override_android_apps to base android_app modules
Fixes: 132447700
Test: app_test.go
Change-Id: I4ac593be661f541f5ea9823ef97373bee4b186f9
This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.
Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
development/vndk/snapshot/update.py
Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
If the callback passed to Once panics it was leaving the waiter
in place that would never be completed. Move writing the value
and signalling the waiter to defer.
Test: TestOncePerPanic
Change-Id: Icc4d3b779a79914fcd881d61d38dffcc2f591c39
The ndk_library, ndk_prebuilt_object and ndk_prebuilt_static_stl
modules are natural targets to have native bridge support enabled,
since they build user facing object which have to be supported for
translated architectures.
Bug: http://b/77159578
Test: make
Change-Id: Ic556f4c1c41e5b3dc92f9c290b4482dee8faed33
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy
from when the 8 -> 9 toolchain upgrade was happening. That migration
is done and the variable only affects the language level, so it should
have a name that reflects that. (The current situation would be
especially confusing if we started a 9 -> 11 toolchain upgrade,
presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11,
since the two settings look incompatible but are actually orthogonal.)
The current variable historically allowed a value or "1.8" which meant
"use the OpenJDK 9 toolchain but target language level 8". That value
no longer has any meaning and the new variable doesn't allow it.
Bug: 131678633
Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true`
Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53
Test: Audit all mentions of the old string here and downstream
Change-Id: Idad808c7f07913baba1a777627322d5452dabcef
This allows us to build guest libraries for the native bridge for
arm/arm64 architectures.
Bug: http://b/77159578
Test: make
Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
robolectric_test will compile a suite of tests that run in
robolectric. For now it also generates a Run* rule, later
that will be removed in favor of atest.
Bug: 123248659
Test: m RunSettingsLibRoboTests
Change-Id: I12407d0b0d639e31c1969077ba787e8985e6a506
The rules that restricted access to core library targets are no longer
required as they have been replaced with visibility rules. The
visibility rules are safer because they check all dependencies whereas
the neverallow rules that have been removed only checked dependencies
in the libs property and so missed dependencies in static_libs and
java_libs properties.
(cherry picked from 8e8c01c382)
Bug: 112158820
Test: m core-tests
Change-Id: I3b50b705b7cd6fcdc55d26cd71b9149b3abd2b88
Merged-In: Ibfef74db0769992266ebadf445836d2a183df3f7
apexkeys.txt now correctly lists prebuilt APEXes with keys specified as
PRESIGNED.
This change also fixes a bug that non-installable APEXes are listed in
the file.
Bug: 131130235
Test: m out/soong/apexkeys.txt and check that
com.android.apex.cts.shim.apex is listed there with PRESIGNED keys.
Merged-In: Ib6d391a82864714743a1cc59cd655bea917b5073
Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073
(cherry picked from commit a41f12a6fa)
This commit allows a module to opt in for ABI checks even when it is
not an LLNDK/VNDK module.
Bug: 131421213
Test: Add `header_abi_checker { enabled: true, }` to some module
Change-Id: Ie09d262e651cbb44d7d0eba652f55dc1e1e52962
Implementation uploaded for review. Includes unit tests but does not
yet handle prebuilts, that will come in a future change once some
more general issues with prebuilts and namespaces is resolved.
See README.md#Visibility for details of what this does and how to use
it.
Bug: 112158820
Test: add visibility rules for core library modules, make core-tests
Change-Id: I8ec980554398ad6f2d42043ce518f811a35da679
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.
The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.
Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.
Change-Id: I49206e656564206d6f7265206361666665696e65
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs
PATH in the test environment. Copy it from the original environment.
Fixes: 129763458
Test: proto_test.go
Change-Id: I41c1acdceee7c35036148256adafb471871034df
The new system collects all Android.mk variable assignments using a map
and writes them to io.Writer. Compared to the previous system, which
directly writes all entries to buffers, this new system is more robust
and test-friendly.
Test: Built without prebuilt_etc.go change and diffed the mk output.
Test: prebuilt_etc_test.go
Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
prebuilt_test is amended to ensure
f2976304f7 is not broken.
PathsForModuleSrc is called to check if the file is from correct module
(either from source or prebuilt module)
Bug: 130627486
Test: m
Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
PathsForModuleSrc does not work if a source module is replaced with a
prebuilt module. This is because the function uses GetDirectDepWithTag
with the name of the original source module. Since the dependency is
replaced and the prebuilt module has the name "prebuilt_<name>", the
search always fails.
Fixing this by re-implementing GetDirectDep* functions inside Soong
using VisitDirectDep.
Bug: 130627486
Test: m
Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.
Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator. Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.
Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
Guava can't compile against a device bootclasspath, it uses methods
that only exist in the host bootclasspath, and then avoids calling
them at runtime.
Bug: 130306229
Test: m checkbuild
Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c
Merged-In: I012030cb701c01ea9ff554c1b6156d0242365a4c
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit b5191a573d)
So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.
Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
This essentially allows you to declare that everything in a directory
will be created by the rule, and we'll ensure that your command actually
writes out all of the claimed outputs, and remove any other files that
previously existed in that directory.
Test: built-in tests
Change-Id: I990dce2b3a0d89ebd2736ac1a0cadfb5864c6e73
BuildNumberFromFile is required to be non-empty for version injection to
work.
The various platform version values are needed for various Java builds.
Test: treehugger
Change-Id: Ifa5844794ea9e9baf0ec725dec107975cd759354
Set the location label for missing srcs and tools to avoid
nonsensical errors when parsing the command.
Test: genrule_test.go
Test: paths_test.go
Test: unbundled branch with missing framework-res module needed by robolectric genrule
Change-Id: I9c1f1cd82a80f048c0e903b8e93910b1ae34b0b1
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.
Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
Export some more config variables that will be used to generate
robolectric's build.prop file.
Bug: 122331577
Test: m checkbuild
Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").
Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
In addition, add Shared_libs to malloc_not_svelte.
Bug: 123689570
Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final
becomes true, which causes the return value of sdkVersionToNumber
for "system_current" to a real version number instead of
FutureApiLevel. This enables the check against
PlatformSystemSdkVersions, which doesn't contain "current". Use
the numeric value instead.
Fixes: 129786845
Test: sdk_test.go
Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.
Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.
Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
Allow rules built with RuleBuilder to use depfiles. Ninja only
supports a single depfile with single output. If there are
multiple outputs in a rule, move all but the first to implicit
outputs. If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.
Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.
Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
Synopsis was missing to soong_namespace module. Also added documentation
to imports properties. This required the namespaceProperties struct to be
pulled out of the NamespaceModule struct in order for the documentation
tool to extract the property documentation.
Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis was
added to soong_namespace and imports properties is listed too.
Change-Id: I519b14629bdbc85f35fbc8fa03e78dc2ad3f655e
This is a new implementation of overriding module types that makes use
of local variants. With this, product owners can use PRODUCT_PACKAGES to
decide which override module to include in their products.
Bug: 122957760
Bug: 123640028
Test: app_test.go
Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
So that it ends up in VTS's DATA/nativetest like a cc_test, and
otherwise acts like a test.
Test: convert external/linux-kselftest to sh_test
Change-Id: I44b7cfca45f8fe5d7fbb6eaa845a79bd70f155ef
This change adds book-keeping of whether an overlay came from
DEVICE_PACKAGE_OVERLAYS or PRODUCT_PACKAGE_OVERLAYS. This is
later used when writing the output to soong_app_prebuilt.mk, to
use either LOCAL_SOONG_[DEVICE|PRODUCT]_RRO_PACKAGES depending
on the original source.
This change is intended to be a noop on its own, but allows a
follow-up make change to customize the location of the auto-generated
RRO packages.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ib24fe1d05be132c360dd6966f7c83968c9939f77
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed. Since not all VNDK libraries will be
ready for this, we keep a list of library names in cc/vndk.go to
indicate which libraries must have their vendor variants always
installed regardless of whether no-vendor-variant VNDK is enabled.
Also add --remove-build-id option to the strip script to facilitate
the check of functional identity of the two variants.
Bug: 119423884
Test: Add a dummy VNDK library and build with
TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding
build/make change.
Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
Notice file for an APEX is created by merging notice files for the
modules included in it (plus the notice file for the APEX itself if
specified).
Notice files having the same content are not duplicated; it is emitted
only once.
Bug: 128701495
Test: m (apex_test is amended)
Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are
license entries for /system/apex/*.apex files
Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them. When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.
Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file. In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.
Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.
Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.
Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
Replace ExpandSourcesSubDir with ExpandSources plus
PathsWithModuleSrcSubDir, which loops over the paths and uses
Join to create paths relative to subdir on any results that
are ModuleSrcPaths.
Test: All soong tests
Change-Id: I11a7face88641e2c26ccdca0a3117d5c38ab588e
go 1.12 changed the stack trace of a function call during global
variable initialization to contain a function called
"PKG.init.ializers". Fix callerName to split the package path
and function name on the first "." after the last "/", and look
for functions called "init.ializers" or functions with the
prefix "init."
Test: Soong tests with go 1.12
Change-Id: I25f1ba989ef2d65ca85cb7c9d84454cca230ff86
Start basic suite support for sh_test so we can
include them in suites.
Test: make adb-remount-sh
Bug: 127959519
Change-Id: If73541d614a2d809e4f94e4fee4c660840631cc1
When extracting dependencies from properties tagged with
`android:"path"`, only look at the general property structs
and not the arch-specific ones. The necessary arch-specific
values will be appended into the general property structs.
Fixes: 128377112
Test: path_properties_test.go
Change-Id: I35e35555d5b15473229a7458fcfc2c7dacaec889
Added more details on the vts_config synopsis.
Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis
was updated in vts_config module.
Change-Id: I1d29a7f800b5dd4e6f1719af5d0d3b723202f33d
This change creates following symlinks for bionic files.
/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so
/system/lib/libm.so -> /apex/com.android.runtime/lib/bionic/libm.so
/system/lib/libdl.so -> /apex/com.android.runtime/lib/bionic/libdl.so
/system/bin/linker -> /apex/com.android.runtime/bin/linker
...
This allows us to not have mountpoints under /bionic.
Bug: 125549215
Test: m and inspect the symlinks in the system partition.
Change-Id: I3a58bf4f88c967862dbf06065a1af8fc4700dda3
Cleaned up the synopsis of filegroups module under android package.
Bug: b/128337482
Test: built the documentation manually and verified that the changes
took place.
Change-Id: Ib5544125e5462fca7c7aebc4bed4647bba11d56b
This patch adds new arch features avx2 and avx512 and
their supported archictectures for x86 and x86_64
Bug: 123376719
Test: m checkbuild
Change-Id: I3c079741815b39d7dbb4072e12ef7c9c2c15f5fe
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
The prebuilt_etc_host is missing synopsis. Also, cleaned up the
synopsis of the remaining prebuilt* module to be clearer.
Bug: b/128337482
Test: Built the documentation and verified that the output is correct.
Change-Id: I64593970a44b548ac841de79aa0e4aa1699c6c9b
Synopsis was missing to the sh_binary[_host] module.
Bug: b/128337482
Test: Ran m soong_docs and verified that sh_binary[_host] module
had a synopsis.
Change-Id: I0bb702ab2d8e4168664e7bba397e0e26af7f03ab
Don't error out immediately if a SourceDepTag dependency is missing
if ALLOW_MISSING_DEPENDENCIES=true is set.
Test: forrest on unbundled build
Change-Id: I9077013e09e3ad0e90ae5163b26aace5b263e63a
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.
Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
Add a mutator pass after DepsMutator that visits every property
struct in every module looking for properties that have a tag
`android:"path"`, and automatically add a SourceDepTag dependency
on any module references (":module-name") found. Uses a cache to
store the mapping of property struct type to locations of
properties with the tag.
Test: android/path_properties_test.go
Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
java_device_for_host and java_host_for_device should rarely be
used and could cause problems if used incorrectly, so restrict them
to only the necessary projects through a neverallow whitelist.
Bug: 117920228
Test: neverallow_test.go
Change-Id: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
Merged-In: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
Vendor-available libs can be double-loaded if LLNDK libs depend
on them. Currently soong checks only 'direct' dependency bewteen
LLNDK and VNDK lib. With this change, soong checks if every dependencies
from LLNDK is also LLNDK or VNDK-SP or marked as 'double_loadable:true'.
This change causes many libs to be marked as 'double_loadable'.
Bug: 121280180
Test: m -j
Change-Id: Ibc1879b6fd465a3141520abe0150018c3051c0a7
java_device_for_host and java_host_for_device allow treating a
device module as a host module and vice versa. They will be useful
for converting layoutlib and robolectric to Soong, as these modules
run device java code on the host.
Bug: 117920228
Test: device_host_converter_test.go
Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
Add support for TestingModule to return RuleParams for rules created
by the module.
Refactor TestingModule to use helpers, and use the helpers to
implement a similar TestingSingleton.
Use the new functionality to test RuleBuilder's module and singleton
rules.
Test: none
Change-Id: I8348c56ff5086d0c49401f5a00faf7c864e6b6f3
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings. Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.
Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
http://b/116873221
This will be used in a target in the build server to build all native
code with coverage.
Test: 'm NATIVE_COVERAGE=true COVERAGE_PATHS=* nothing' works as
expected.
Change-Id: I55d644ed9212c4ab0f1e4a00aac3a467fcf2a463
Permit product_varables: { debuggable: { required: ["remount"], }, },
so that we can add debug dependencies between build objects.
Test: compile
Bug: 122602260
Change-Id: Ibb4c5bf368f90fdb007d30b6c1da63cb9d4c6467
These additional binary types are useful for some apexs. Add the
ability to include them. Due to the nature of the resulting artifacts
only py binaries with embedded launchers and host go binaries are
supported.
Test: m com.android.support.apexer
Bug: 119332365
Bug: 119332362
Change-Id: I27c253d3647cf7bbe15896610d7a74a5f93e8bec
This reverts commit aa65e17016.
Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use.
Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
This new module type replaces the inherit-package function in make by
allowing developers to override the name, the certificate, and the
manifest package name of an android_app module.
Bug: 122957760
Fixes: 123640028
Test: app_test.go + BrowserGoogle
Change-Id: Iefe447e7078b25039233221361ef95c83a29973a
Copying p.rel doesn't work, as rel needs to match the end of the
value in path. Apply the same transformation to p.rel as p.path.
Test: paths_test.go
Change-Id: I42d676c6c4fc18d9852c1a73f25e5a791d7553d0
This is almost the same as prebuild_etc except the base path.
Bug: 122616578
Test: prebuilt_etc_test.go
Change-Id: I512b17a88062403225ae6ec248f857c88fccf47a
Make is not setting PreoptBootJars, pass the value computed in
Soong back to Make.
Test: m checkbuild
Change-Id: Ie3db926df9c5d6bf18db1003b95823c7566800a9
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.
This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.
Test: all soong tests
Test: m checkbuild
Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
Previously the build doc was a gigantic list of modules and properties,
which can be overwhelming to new users. This change breaks it up by
packages, so that it is easier to look up and feels more coherent.
Bug: 123521276
Test: m soong_docs
Change-Id: I1a1a331f4b4deb8782d698e9076098c5a27b9566
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.
Test: all soong tests
Test: m checkbuild
Change-Id: I886f803d9a3419a43b2cae412537645f94c5dfbf
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
Unfortunately we still need to build the NDK sysroot as non-NEON
since that's still supported, though it's no longer the default.
This reverts commit f4e0601c7e.
Test: treehugger
Test: rebuilt NDK sysroot and imported into the NDK, ran NDK tests
Bug: None
Register any Singletons that implement a MakeVars method as
MakeVarsProviders, and convert the hiddenapi singleton to
use it.
Test: m checkbuild
Change-Id: I6a2044ad34ef46a8b267762ddfeb51aa01d7734d
Add a utility method that returns a copy of a slice of strings.
This is primarily useful when appending to a string slice to avoid
accidentally reusing the backing array.
Test: util_test.go
Change-Id: I7801fc7ca19e27ddc9f1b1b452788b723c7f619c
OncePer.Get must call maybeWaitFor on the value it reads, otherwise
it could return a waiter instead of the real value.
Test: onceper_test.go
Change-Id: I7d407bd1c577dbb43bc14fa107d5f606bf2b1c67
SecondArchIsTranslated is only used to determine whether or not to
dexpreopt the second arch, so it should return false for the case
where the primary and secondary arches are X86_64 and X86, but the
primary arch also lists an Arm ABI.
Bug: 124711830
Test: m on failing build
Change-Id: I6afc2fdda466e0c406dbeada2e9c3df2bb6853bf
Add PathsForOutput to convert multiple strings into WritablePaths.
Add OutputPath.InSameDir to build a new OutputPath pointing to a
file in the same directory as an existing OutputPath.
Add WritablePathForTesting and WritablePathsForTesting that mirror
PathForTesting and PathsForTesting but return WritablePaths.
Add PathContextForTesting to return a minimal PathContext
implementation.
Test: paths_test.go
Change-Id: I9708eb164b273514a96dae0a260ef9a963fb9bcf
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.
As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.
Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
This is almost the same as prebuilt_etc except the base path.
Bug: 122616578
Test: prebuilt_etc_test.go + manual test with external/neven
Change-Id: Ie3d17c06a878853ec9df93fe2c61c8772bc5cff4
bootstrap.ModuleTypeDocs needs a mapping of module types to factories
to support factories that are wrapped in ModuleFactoryAdapter closures.
It also returns ModuleType objects grouped into Package objects.
Bug: 67909957
Test: m soong_docs
Change-Id: I70eac9f0f0e13075580da92d4219792ca0b18fbf
Add a RuleBuilderInstalls type for a slice of RuleBuilderInstalls,
and give it a String() method that returns the list of installs
in the format that is convenient for passing to Make.
Test: rule_builder_test.go
Change-Id: I2e9cd9abf4dfb0ad312d0a6662f1567baf9cd222
Add a helper method that returns a new OutputPath with the
extension replaced.
Test: paths_test.go
Change-Id: I7f93b3475031a19b53652022740488373a1b7d97
Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.
Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
The value constructor passed to OncePer.Once may call back into
Once. Replace the global mutex with a temporary channel stored
in the map using the key, and have callers for the same key
wait on the channel if they find it instead of a real value.
Test: TestOncePerReentrant
Change-Id: Ifa88a3c48981b5076b83f47fbdee5d26311725c6
Move the makevars singleton after all dyamically registered
singletons, but before the env singleton, to ensure that it
can reference values initialized in other singletons.
Test: m checkbuild
Change-Id: I6ea45d3a174b94d4e89f3168894399e7022733e4
Require that the key for Once calls be created with NewOnceKey
or NewCustomOnceKey.
Test: m checkbuild
Change-Id: I44b8ea6034338b45f558f862b21d5732364cbf0f