Commit graph

643 commits

Author SHA1 Message Date
Haibo Huang
a31e2bda89 Add support for cortex-a76 in soong
Bug: 117125298
Test: Change a device to be A76 and build
Change-Id: Iae0773d54e57b247c818d44f8044180d5a3f95a8
2018-10-12 23:55:38 +00:00
Neil Fuller
fe385b001c Expand projects allowed to use no_standard_libs
There are a set of git projects that are part of or
closely related to "core libraries" and will need to
be allowed to compile against core library implementations
(and not stubs) after we've switched the default to use
stubs.

Bug: 113148576
Test: build
Change-Id: Id10b7dd83b173bdbfdb07b404d0e5f1ff621e543
2018-10-11 16:03:39 +01:00
Neil Fuller
039a83fdd3 Merge "Include all core libs in default boot classpath" 2018-10-11 08:35:59 +00:00
Jiyong Park
9d45299ba4 Add ApexModule interface for APEX-aware modules
ApexModule is the interface for APEX-aware modules. The module type apex
uses the interface to get APEX-specific information from other modules,
such as the list of APEXs that a module should be built for.

A module that is included in an APEX will be built specificaly for the
APEX. This is especially required for shared libraries; we shouldn't
just copy the artifacts built for platform, because they may be linking
against private (=unstable) symbols that are not available to APEXs
which are basically unbundled.

This CL, as a first step, makes cc.Module an APEX-aware module type.

Bug: 112672359
Test: m apex.test; the built apex has all the direct and transitive
shared lib dependencies of the libs and executables listed in Android.bp

Change-Id: I21f6a586654779984f0f5154b2a08b2adbf2168b
2018-10-11 11:19:07 +09:00
Neil Fuller
1fee9f3dd0 Include all core libs in default boot classpath
To migrate the default compilation over to using
"core platform api" stubs we need to make the "before"
state as close to the "after" state as possible.

The stubs will include all "core libraries" so it
makes sense to include those that contribute to the
"core platform api": okhttp, bouncycastle and conscrypt.

(apache-xml is not included because it doesn't contribute
to the core platform API).

After this change all explicit dependencies to okhttp,
bouncycastle and conscrypt in situations where the
default boot classpath is used can be removed.

A knock-on of this change is that the conscrypt, bouncycastle
and okhttp targets need to be adjusted to explicitly
depend on core-oj / core-libart with no_standard_libs: true
to avoid a cycle.

Bug: 113148576
Test: treehugger
Change-Id: I1677af8d9d48fd026874ebce4c864f39ec1a5a3d
2018-10-10 08:42:12 +00:00
Colin Cross
a4f08813a3 Add support for JNI libraries to android_app modules
Make android_app modules a MultiTargets module, which means the
common variant will have a list of Targets that it needs to handle.
Collect JNI libraries for each Target, and package them into or
alongside the APK.

Bug: 80095087
Test: app_test.go
Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
2018-10-08 15:20:56 -07:00
Colin Cross
ee0bc3b290 Add multi-target variants
Allow modules to specify that they will handle multiple targets in
the common variant.  This will be used by android_app modules to
handle JNI libraries from multiple architectures.

Bug: 80095087
Test: m checkbuild
Change-Id: Iede3e9c23b64fb516341c3ae08074a322b511d40
2018-10-08 15:20:21 -07:00
Treehugger Robot
445a4843cc Merge "Remove Sepolicy_split." 2018-10-08 20:58:35 +00:00
Steven Moreland
d6ea749030 Remove Sepolicy_split.
It's not referenced anywhere anymore (or filled out).

Test: m nothing (parses Android.bp files)

Change-Id: I5a90bcc1ea949ee054c452eefeb2cfc2640cfaa6
2018-10-08 10:33:41 -07:00
Treehugger Robot
17ccb45a5a Merge "Add methods to get source file path and subdir of prebuilt_etc" 2018-10-06 06:18:18 +00:00
Colin Cross
2a07692643 Add tests for genrule command expansion
Add tests for expanding variables in a genrule cmd property.

Test: genrule_test.go
Change-Id: I8288b8616d518bb5f24a892c4e59f68d95055d0a
2018-10-05 21:29:14 +00:00
Jiyong Park
c43e0ac0dd Add methods to get source file path and subdir of prebuilt_etc
The path and dir are used by apex to include prebuilt files in APEXs.

Bug: 112672359
Test: m apex.test
Change-Id: I780edc8f15e00e644c41fa2eb9dc73c25339c727
2018-10-05 14:13:50 +09:00
Colin Cross
a9d8bee9f3 Make prefer32 a lambda
prefer32 needs to be set differently for app and native modules.
Make it use lambda provided by the module type instead of trying
to make archMutator figure it out.

Test: m checkbuild
Change-Id: Ibf8af35fdd3e1721725539d1f5452f4439d2125c
2018-10-03 14:31:10 -07:00
Colin Cross
5eca7cb229 Clean up archMutator
Use a variable for module.base() and separate the full list of
targets for the class from the filtered list of targets for the
module.

Test: m checkbuild
Change-Id: I32edd26bcbaff0baf433d0581f253b8a5c8b81f3
2018-10-03 14:31:10 -07:00
Colin Cross
88da24e578 Add DevicePrefer32BitApps to Soong
Bug: 80095087
Test: m checkbuild
Change-Id: Ia2b2435492198ad646cbf7c59c6af59d381b20a5
2018-10-02 20:12:50 +00:00
Colin Cross
2465c3d998 Add phony targets for go binary modules
Add custom handling to androidmk.go for the bootstrap.GoBinaryTool
interface in order to create .PHONY targets for each tool written
in go.

Bug: 64539926
Test: m checkbuild
Test: m androidmk
Test: m multiproduct_kati
Change-Id: Ic65faa27a6ee4dfbd54ed6d208091db7c1d657a2
2018-09-28 10:25:45 -07:00
Neil Fuller
cf157ccb16 Allow conscrypt to depend on core.intra.stubs
conscrypt is built against an API surface we define
in libcore as core.intra.stubs. Therefore we need
an exception to the libcore dependency rules.

Bug: 113148576
Bug: 110404540
Test: make conscrypt
Change-Id: If36e05b2d8339741393752bd864bdb5d6c0f503e
2018-09-26 16:19:46 +01:00
Colin Cross
7692bf2468 Merge "Update soong for ShouldFollowSymlinks argument to pathtools.Glob" 2018-09-25 23:57:46 +00:00
Richard Fung
eb37ed3832 Add support for cortex-a72
Bug: 113346253
Test: lunch cheets_arm64-eng; m
Change-Id: I02dd1cfe75f97767eac7424d472ff643987c276b
2018-09-24 16:33:45 -07:00
Colin Cross
3f4d116496 Update soong for ShouldFollowSymlinks argument to pathtools.Glob
pathtools.Glob now takes a ShouldFollowSymlinks argument.  Add
pathtools.FollowSymlinks to all the calls to pathtools.Glob to
maintain current behavior.

Test: m checkbuild
Change-Id: I0215efb212be4ba4513669612d88c2baade43747
2018-09-21 16:08:16 -07:00
Brandon Lee
5d45c6f6f8 Collect modules' info to create IDE project file.
- Register a singleton and implement GenerateBuildActions func in java/jdeps.go.
- Declare a interface and a struct to collect info in android/module.go.
- Implement IDEInfo for Library & Import module in java/jdeps.go.
- Implement IDEInfo for Genrule module in genrule/genrule.go.
- Implement IDEInfo for fileGroup module in android/filegroup.go.
- Test codes for jdeps.go in java/jdeps_test.go.

Bug: 111044346

Test: export SOONG_COLLECT_JAVA_DEPS=1;mmm packages/apps/Settings
      out/soong/module_bp_java_deps.json will be generated

Change-Id: If61da77b4d7614c2c5da438b6af4c725ceccc5c3
2018-09-18 17:44:10 +00:00
Mathieu Chartier
ab033dc684 Merge "Revert "Change LibartImgDeviceBaseAddress to 0x60000000"" 2018-09-18 07:11:33 +00:00
Mathieu Chartier
d42f19cd7a Revert "Change LibartImgDeviceBaseAddress to 0x60000000"
This reverts commit 0c7bb7f31b.

Reason for revert: Some tests failing

Change-Id: I354ab0055aa8a7dea688422871d13aa78fa0018d

Exempt-From-Owner-Approval: bypass
Test: make
Bug: 112670831
Bug: 115828232
2018-09-18 07:10:36 +00:00
Sundong Ahn
4fd04bb506 Change the dist file path for sdk library
The dist file path is changed from apistubs/{api_scope}/*.jar to
apistubs/{owner}/{api_scope}/*.jar. it makes easy to get stub files
when updating prebuilts/sdk by making it possible to distinguish
between Android libraries and Google libraries.
And Onwer() function is added to ModuleBase for getting onwer info.

Test: make -j40 PRODUCT-sdk_phone_armv7-sdk dist sdk_repo
Change-Id: I50069aff6664901e6c9129d69643a414ee5e41d0
2018-09-17 09:43:30 +00:00
Mathieu Chartier
1278a6ce77 Merge "Change LibartImgDeviceBaseAddress to 0x60000000" 2018-09-14 19:35:45 +00:00
Colin Cross
fe4bc36f87 Allow '$' in some paths
The icu resource directories contain filenames that have '$'
characters.

Allow paths returned by the Glob functions to contain '$', on the
assumption that real paths on disk are unlikely to contain strings
that are valid ninja variables.  Fix the Build rules to escape any
paths that are passed as Path arguments.  Fix the resource rules to
manually escape the paths that are passed as strings.

Test: m checkbuild
Change-Id: Ie631bc6d96259e592adb280491a365c0df7ed0e2
2018-09-13 18:27:50 +00:00
Mathieu Chartier
0c7bb7f31b Change LibartImgDeviceBaseAddress to 0x60000000
Lower it to have more space to allocate the region space after.

Test: make
Bug: 112670831
Change-Id: I336fe25466711d93481f30e69141449d3cfbf7e2
2018-09-07 14:06:39 -07:00
Colin Cross
953d3a2b28 Wrap panics that occur in AndroidMkDataProviders
Annotate panics that come from an AndroidMkDataProvider with the
module and variant that it was running on.

Test: m checkbuild
Change-Id: I4a2f32b1987dc028c446e9379a0738059e7679b1
2018-09-07 01:10:11 +00:00
Treehugger Robot
37710d3c71 Merge changes Ifd529f88,I2fb4429a,I67ec2e94
* changes:
  Fix logic for adding gnu debuglink to match Make
  Add Soong support for stripping all symbols
  Add stripping and toc support to Soong cc_prebuilt modules
2018-09-06 23:05:09 +00:00
Colin Cross
3dceee3241 Fix multilib first with multiple 64-bit architectures
Binaries that use multilib "first" expect zero or one architectures
because they will install to the same bin directory for any
architecture.  Replace preferTargets with firstTarget that always
returns zero or one Target.

Test: OUT_DIR=out_ndk build/soong/scripts/build-ndk-prebuilts.sh
Test: m checkbuild
Change-Id: I6dcfa9ecda30177e1a262153d93a5a205d5c7076
2018-09-06 10:24:05 -07:00
Colin Cross
ed064c0b1f Fix logic for adding gnu debuglink to match Make
Only add gnu debuglink on userdebug builds to match Make, and don't
add it when using minidebuginfo, which doesn't support it.

Bug: 113936524
Test: m checkbuild
Change-Id: Ifd529f88d63afa5627172fb6ea612aea77159f40
2018-09-05 16:30:16 -07:00
Sasha Smundak
61ebf8df66 Provide access to product_variables.malloc_svelte.cflags inside target.
Test: soong still works.

Change-Id: I359f1e750e5961a21e3eeb9f1f3aa47974d7e99f
2018-08-31 16:59:32 -07:00
Colin Cross
6db4a6a7d9 Skip DepsMutator on disabled modules
Dependencies of disabled modules may not have the right variations
for calling AddVariationDependencies, skip DepsMutator completely
on disabled modules.

Bug: 112707915
Test: m checkbuild
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: I702e591437e5e6eb9f91f3b7eb32bacc4bd5d249
2018-08-30 19:54:37 +00:00
Dan Willemsen
e97e68a05a Clean up darwin cc toolchain
Remove the ability for Soong to build 32-bit darwin code. We've already
disabled this in Make, this is just removing the unused bits in Soong
and simplifing the toolchain config.

Test: m host
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I968c5d98bdf162297d639f7988918dadb7ba6e07
2018-08-28 20:08:50 -07:00
Jiyong Park
5baac54d58 link type of recovery variant of a vendor module should not be native:vendor
This CL fixes a bug that when a module is configured as 'vendor: true' &&
'recovery_available: true', the link type of the recovery variant of the
module is incorrectly set to 'native:vendor'. This was because,
androidmk.go emits 'LOCAL_PROPRIETARY_MODULE := true' whenever
Proprietary property is set to true, regardless of whether it is a
recovery variant or not. This in turn makes LOCAL_USE_VNDK := true for
the module which in turn causes the link type to be 'native:vendor'.

Fixing the bug by resetting the properties like Proprietary, Vendor,
Soc_specific, etc. for the recovery variants.

Bug: 113277544
Test: m -j (test added)
Change-Id: I5d6ae76e46ef8fcd9204d386d0809862a7b0ff7e
2018-08-28 10:03:17 +09:00
Tao Bao
e125532e12 Specify LOCAL_INSTALLED_MODULE_STEM for prebuilt_etc.
Otherwise the recovery variant gets installed with `.recovery` suffix.

Bug: 112780007
Test: Build with the mke2fs.conf change (using Android.bp to install
      mke2fs.conf). Check the installed filenames (under normal boot and
      recovery both).
Change-Id: I882be2fa07b530667a2dafc2bfe18730a42c4c08
2018-08-21 12:35:06 -07:00
Tao Bao
aefd64aacf Merge "Add recovery_available to prebuilt_etc." 2018-08-21 01:21:56 +00:00
Yifan Hong
7bbacf3478 Merge "s/product-services/product_services/g" 2018-08-21 01:07:56 +00:00
Dario Freni
95cf767918 s/product-services/product_services/g
Attempting to reduce the number of different spellings we have for
"product services" partition in the codebase.

Bug: 112431447
Test: m
Change-Id: I0a393a1d625e7ea3217d28735a4db709bce32395
Merged-In: I0a393a1d625e7ea3217d28735a4db709bce32395
2018-08-20 17:46:57 +00:00
Tao Bao
0ba5c94a94 Add recovery_available to prebuilt_etc.
The property is similar to the ones for cc_*, where it can additionally
create a recovery variant of the module when used.

Bug: 112780007
Test: Build mke2fs.conf with `recovery_available: true`.
Test: `go test -run TestPrebuiltEtc`
Change-Id: Ia04360d00453fa1f80022301feb369514f5e2b0b
2018-08-20 10:15:24 -07:00
Colin Cross
e3924e180b Allow paths containing glob characters in glob results
Some paths contain glob characters.  For now allow paths with glob
characters as long as they are in glob results.  In the future we
may need to allow escaping glob characters.

Test: m checkbuild
Test: paths_test.go
Change-Id: I1cbeea658e8fc4975ca0b6a50a8c24ac2de026c5
2018-08-16 17:03:56 -07:00
Colin Cross
3063b78ea5 Make :module provide the output file for java modules
Make :module on a java_library provide the output file, which is
normally the implementation jar.  For java_library modules with
installable: true or compile_dex: true this will be the dexjar
instead.  For android_app modules this will be the apk.

Bug: 80144045
Test: no change to out/soong/build.ninja
Change-Id: I739674aee60a38bfccb859369e4414b46f293d82
2018-08-16 16:13:58 -07:00
Dan Albert
0981b5c30f Revive and document HostAndDeviceDefault.
This seems to have bitrotted at some point. Revive it and document
all the enum values.

Test: make checkbuild
Bug: None
Change-Id: If3e7b096e95b089097271ed594a808437f810639
2018-08-08 14:36:30 -07:00
Dan Albert
6bc5b8320f Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
(cherry picked from commit c229f38e93)
2018-07-24 22:52:57 +00:00
Dan Willemsen
af42826aee Fix go vet issues
am: 59339a29e1

Change-Id: I6c5de64ee36c1dde4e043b36f84d2cf140afac41
2018-07-22 23:23:59 -07:00
Dan Willemsen
59339a29e1 Fix go vet issues
Test: go vet ./...
Change-Id: Ifb936ccc5e2b5a2c3fcbbbcb54f680e2973ea1b3
2018-07-22 21:18:45 -07:00
Dario Freni
fafe84fc6d Add support for /product-services partition
am: fd05a74e06

Change-Id: Ie9e3487fb3643e7276d8517c1ec87af07240585a
2018-07-20 02:09:08 -07:00
Dario Freni
fd05a74e06 Add support for /product-services partition
This is an adaptation of Icc4f8c16bc389fe20db680849f311d02df1299c3, to
support modules that are installed on the /product-services partition.

Bug: 80741439
Test: m -j both with and without enabling the new partition
Change-Id: I72b335ad38baff5848cd3da7489343f8cf98ff16
2018-07-19 14:04:30 +01:00
Logan Chien
8847412281 Merge changes I420a5953,I8e2352f3,I7a6bb905
am: 23be383843

Change-Id: Ie35e110f38405cb018a887274c6099456844c454
2018-07-18 21:22:24 -07:00
Treehugger Robot
23be383843 Merge changes I420a5953,I8e2352f3,I7a6bb905
* changes:
  Support text ABI dump file format
  Remove vndkVsNdk()
  Remove isSourceDump from PathForVndkRefAbiDump()
2018-07-19 04:15:30 +00:00