Commit graph

68 commits

Author SHA1 Message Date
Haibo Huang
f46b1cb06e Remove denver64 from soong
Test: build
Bug: 73545680
Change-Id: I6b213a1d83275c566fd6142a07550094240528c4
2018-12-04 21:01:50 +00:00
Artem Serov
d3072b0c7c Support Qualcomm Kryo 385 CPU variant.
Support Kryo 385 cpu variant which should be used for
Qualcomm Snapdragon 845.

Motivation:
  kryo385 CPU *IS NOT* an Arm Cortex-A75.

Particular problem:
  Cortex-A75 CPU must support optional ARMv8.2 dot product
  feature; kryo385 CPU (Qualcomm Snapdragon 845) doesn't
  support it.

Test: Builds when kryo385 is used as cpu variant.
Test: Pixel 3 boots to GUI with kryo385 as CPU variant
      with this patch on AOSP 9.0.0 r16.

Bug: 119564566

Change-Id: I62ffb46b1977b48446c6c1ca1400b1b39f7a8457
2018-11-21 10:15:07 +00:00
Colin Cross
c17727d06b Shard arch property structs
Arch property struct types are created at runtime.  Go has a limit
of 2**16 bytes for the name of a type, and the type of a struct
created at runtime is a string containing all the names and types
of its fields.  To avoid going over the limit, split the runtime
created structs into multiple shards.

Also undo MoreBaseLinkerProperties now that it is no longer
required.

Bug: 80437643
Test: m checkbuild
Test: no change to out/soong/build.ninja
Change-Id: I035b20332ec63f3d4b1696855c5b0b0a810597b7
2018-11-12 19:04:13 +00:00
Dan Willemsen
9ff34c0ca8 Update linux_bionic configuration
Add a missing toolchain method, don't require modules to opt in to
linux_bionic.

Bug: 31559095
Test: attempt to build host bionic
Change-Id: Ia5c8e2f127b88f56191b7abc389d5329cfdb0720
2018-10-22 15:46:03 -07:00
Dan Willemsen
0ef639bb59 Allow generating modules once per OS instead of once per Class
When building with two OSes of the same class (Host, etc) enabled,
independently produce variants of each module for each OS, instead of
making `compile_multilib: "first"` select just one of the OSes.

My use case this is for Linux + LinuxBionic, which are both considered
Host class, but this would also applied if we wanted to generate rules
for Linux+Darwin, or some combination of firmware bits (either in
addition to Android in the Device Class, or multiple firmwares in a new
Class)

Bug: 31559095
Test: enable host bionic, see a linux(_glibc) and linux_bionic
      definition for binaries
Change-Id: I55e7f046758b3dc2a31da2c4b20274ec68ece0a0
2018-10-22 15:46:03 -07:00
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
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
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
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
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
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
37b252096a Don't create non-primary arch variant for recovery-only module
To save space, only the primary arch variant is installed to the
recovery partition. This has been done in the imageMutator by not
creating recovery variant for the non-primary arch.

However, this caused a problem for recover-only module, i.e., recovery:
true. Such module ends up creating no variant for the non-primary arch.
Since every other modules are at least in one image variant, any
dependency fro such module with no image variant can't be satisfied.

In order to solve the problem, archMutator is modified to create only
the primary arch for recovery-only modules.

Bug: 111321972
Test: m -j (TestRecovery added)
Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
2018-07-12 10:49:30 +09:00
Christopher Ferris
ba14a8f4bb Add support for cortex-a55/cortex-a75.
Bug: 78133793
Bug: 78242072

Test: Builds when using cortex-a75 as a target.
Change-Id: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
Merged-In: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
(cherry picked from commit 0612597a41)
2018-05-11 00:43:39 +00:00
Colin Cross
ff3ae9da74 Consistently use Bool instead of proptools.Bool
Use Bool instead of proptools.Bool and String instead of proptools.String.

Test: m checkbuild
Change-Id: I32d84add9f27128c7a65413e9612fd920613584f
2018-04-10 22:50:34 -07:00
Dan Willemsen
45133ac184 Make Config.ProductVariables private
All access to these should be going through the methods on Config /
DeviceConfig.

Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
2018-04-11 01:45:29 +00:00
Victor Khimenko
5eb8ec1e72 Make arm_on_x86 symmetric
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
2018-03-21 20:30:54 +01:00
Dan Willemsen
e401a8315e Remove armv5te
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
2018-01-08 15:48:25 -08:00
Colin Cross
b4330e222b Move string list utility functions to android package
Test: m checkbuild
Change-Id: I50a7ccf9fd7ed82b688e3eb90489c0bc0af33287
2017-12-28 17:41:02 +00:00
Dan Albert
d3c8ca4469 Update the NDK ARM ABI to armv7.
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
2017-12-20 14:48:39 -08:00
Colin Cross
6b4a32d771 Split java_binary modules into common and binary variants
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
2017-12-06 04:16:21 +00:00
Colin Cross
6510f91a1c Replace ModuleContext.AConfig() with Config()
AConfig() now duplicates Config().  Replace the uses of AConfig()
with Config().  Leave AConfig() for now until code in other
projects is cleaned up.

Test: m checkbuild
Change-Id: Ic88be643049d21dba45dbd1a65588ed94bf43bdc
2017-11-30 00:44:18 +00:00
Dan Albert
f45c6934c8 Stop building MIPS ABIs for the NDK.
Test: build/soong/scripts/build-ndk-prebuilts.sh
Bug: https://github.com/android-ndk/ndk/issues/272
Change-Id: Ia8d48b1ecef5e1a3b239e2817eeed5dbe43e52ef
2017-11-03 19:38:03 +00:00
Colin Cross
7d716baedf Revert "Revert "Make some common properties overridden when used in defaults modules""
This reverts commit 5c3c768187.

This reapplies I70e45caa92f65dc6a3bc81ae33a5a8f34ad11890 along with
additional changes in other projects to match the new types.

Bug: 68337468
Test: m checkbuild
Change-Id: I2d2d876b291869f834a6468d3e2ad99148f94a15
2017-11-01 14:24:48 -07:00
Nicolas Geoffray
5c3c768187 Revert "Make some common properties overridden when used in defaults modules"
Bug: 68337468

Breaks HOST_PREFER_32BIT=true

This reverts commit 617016a6f2.

Change-Id: Ifb20f41cdf93dbfd73a3aac5b055e595e334350b
2017-11-01 09:32:53 +00:00
Colin Cross
617016a6f2 Make some common properties overridden when used in defaults modules
Switch commonProperties to *string and *bool so that defining them
in a module correctly overrides instead of appends to values set
in defaults modules.

Bug: 68337468
Test: m checkbuild
Change-Id: I70e45caa92f65dc6a3bc81ae33a5a8f34ad11890
2017-11-01 05:28:36 +00:00
Dan Willemsen
86fc1ebac3 Add target.linux for linux kernel based targets
This includes android, linux_bionic, and linux_glibc currently.

Test: m nothing
Change-Id: I088eab583eee695c1f61a65a79a302837e5f4577
2017-10-03 14:44:06 -07:00
Dan Willemsen
5746bd481e Remove target.linux
Once this is submitted and we don't have any more references to
target.linux, it can be added back as a common target for all
linux-kernel based targets.

Test: m nothing
Change-Id: Iae5e82eaed65f58950115f21530ae04afd0602b9
2017-10-03 19:44:54 +00:00
Colin Cross
d5934c8bb7 Fix arch specific properties for java modules
Arch specific properties were not being applied to modules
with OS set to Common.

Test: java_test.go
Change-Id: I8f1b49ca51b0cf96f78006dfcd121672e581d9c5
2017-10-02 23:18:19 -07:00
Dan Willemsen
866b563d4c Add target.linux_glibc and target.bionic
target.linux_glibc will apply to host builds with glibc, which is
identical to the current target.linux. In a future change, target.linux
will change to affect all targets using the Linux kernel (android,
linux_bionic, and linux_glibc).

target.bionic will apply to all OS variants using Bionic.

Bug: 31559095
Test: Add target.linux_glibc, target.bionic sections to an Android.bp, build
Test: m host
Change-Id: I677a67c22fba148fec264132311e355283f9d88d
2017-09-26 22:41:37 -07:00
Junmo Park
8ea4959279 Add support for Exynos-M1
Change-Id: Ie57507a5d0ea9101db603ff3538c51853083a314
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
2017-07-24 07:14:55 +09:00
Junmo Park
d86c902470 Add support for Exynos-M2.
Change-Id: I646f303b460556a9b36a44574f25dd992d42906c
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
2017-07-22 09:16:31 +09:00
Colin Cross
36242850fd Refactor factories
Change module factories from returning a blueprint.Module and a list
of property structs to returning an android.Module, which holds the
list of property structs.

Test: build.ninja identical except for Factory: comment lines
Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
2017-06-30 21:08:36 +00:00
Jake Weinstein
6600a44072 soong: add cortex-a73 to microarchitecture list
* Was missed in I3325f60add7f424f8cca53c22919fc481ef5e787

Change-Id: I24d1ef38922cb8f46c9136018cce6a22293ca95e
2017-05-15 18:27:12 -04:00
Colin Cross
67a5c132c5 Prettify soong ninja build descriptions
Descriptions currently look like:
[  0% 4/29328] cc out-soong/.intermediates/external/clang/lib/Sema/libclangSema/android_arm_armv7-a-neon_denver_static_core/obj/external/clang/lib/Sema/SemaCodeComplete.o

This is not very helpful - most of the characters are used to show the
output path, which contains useful information like target architecture,
but also contains most of the path to the source files twice, and less
useful information like the exact variant name used by soong.
Make the descriptions look like:
[  0% 3/29329] //external/clang/lib/Sema:libclangSema clang++ SemaTemplateInstantiate.cpp

This is //path/to/module:modulename tool relative/path/to/source/file

Test: builds, looks pretty
Change-Id: I3087aa7d4eb1860ef6239d77407b8b35445616d7
2017-05-10 11:04:16 -07:00
Nan Zhang
db0b9a3cf3 Supported python build in host side.
The base module handles all the common functionalites, such as version
compatibilty check, version variations split, source file format check,
source/data file duplicate check.

The library/binary module focuses on how to generate binary build actions,
such as setting up stub script, zipping, filling in __init__.py in
runfiles dir tree.

Bug: b/31676493
Test: go test under python package

Change-Id: I06608369f350f7195873d459e1c8d1bdb811e77e
2017-05-05 13:27:56 -07:00
Colin Cross
1837b802e1 Enable mips32r2dsp[r2]-fp in mega device build
These seem to build now.

Test: mega device build
Change-Id: If2514258b0c57d6db484aed4c17a3e1f62109429
2017-04-27 12:21:24 -07:00
Colin Cross
0906f17f7e Add arm neon and mips dspr2 arch features
Current modules must use armv7_a_neon to specify source files that
compile only with neon.  If a future arch variant also supports neon,
all these modules will fall back to non-neon.  Support a neon arch
feature that modules can use instead.  Similarly, support dspr2 for
mips.

arm_device.go was also mixing armv7-a-neon with armv7_a_neon.  Use
armv7-a-neon consistently, and fix the - to _ when creating the
property structs.

Test: m -j checkbuild
Change-Id: I24d3764280ab3bcbb9a73c0934edc9b99fc7f6a0
2017-04-27 12:21:24 -07:00
Colin Cross
4247f0d0ed Enable arm_on_x86 mode when arm is a secondary arch
Enable arm_on_x86 mode whenever compiling for x86 on the device,
and either arm is listed as an ABI on the x86 arch, or arm exists
as a target arch.

Bug: 35286489
Test: examine bcc cflags
Change-Id: Iebd0e7b95f584d25773a60474c27425cac7a578e
2017-04-13 16:56:14 -07:00
Alex Naidis
ac01ff5447 Add support for an armv8 variant for Kryo
* Use mcpu=cortex-a57, since it is the closest to Kryo.
* Clang doesn't support Kryo as a target yet.

Bug: 36728278

Test: Built and booted a sailfish using Kryo.

Change-Id: Ic0c9588d86fba41896e50e3f0cf0d2b310ffee93
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-04 19:09:43 +00:00
Alex Naidis
ae4fc18406 Add support for an armv7 variant for Kryo
* Kryo is closer to Krait than to cortex-a53, so choose Krait defaults.

* Made together with Jake Weinstein (xboxfanj)

Bug: 36728278

Test: Built and boot sailfish set up as kryo.

Change-Id: I04fa0a1dca6f97ae19202d28ee3ce8a59bf169b5
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-04 19:09:36 +00:00
Dan Willemsen
01a405a481 Add LinuxBionic toolchain and switch
This adds a toolchain definition for LinuxBionic that only supports
Clang/64-bit. It pulls pieces from the x86_linux_host and x86_64_device
configs, and uses the android clang triple, with some manual overrides.

To enable building this, set your soong.config file to:

 {"Host_bionic": true}

Bug: 31559095
Test: out/soong/{Android,make-vars}-aosp_arm64.mk the same with or
      without host bionic turned on
Test: No change to out/soong/build.ninja before/after this change
Change-Id: Id97dda8bd9aa670c32aed31fbe6aaa8175e70b59
2017-03-15 14:18:42 -07:00
Dan Willemsen
0e2d97b4b1 Stop making the ndk headers host-specific
This breaks when I enable a second host configuration for host bionic.

Make non-arch modules !Device and !Host by adding "Generic" as the zero
value. Make the SkipDeviceInstall config only apply to Device modules.

Test: out/soong/build.ninja is identical expect for comments
Change-Id: I6e2bd3814a9968554d3901a508d822d5c79d08a0
2017-03-15 20:20:22 +00:00
Colin Cross
0801633173 Do not duplicate arch properties when cpu variant == arch variant
build/make/board/generic_mips/BoardConfig.mk sets
TARGET_CPU_VARIANT := TARGET_ARCH_VARIANT, which can cause the same
variant-specific properties to be applied twice.

Test: lunch aosp_mips-eng && mmma -j external/skia TARGET_ARCH_VARIANT=mips32r2dspr2-fp
Change-Id: Ie4abe804f8ce898bf89664ae749b9bc8ac3e649f
2016-12-20 09:53:14 -08:00
Colin Cross
bb2e2b7d7f Support arm_on_x86 properties
Allow Android.bp files to set properties when an x86 device supports
arm abis.

Test: lunch aosp_fugu-userdebug && mmma -j frameworks/compile/libbcc
Change-Id: Ic142a3f93175924a826dea9908b2e5183a486184
2016-12-08 17:27:25 -08:00
Dan Willemsen
00fcbde401 Add LinuxBionic OsType
Actual support will come in later changes.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I31392fb78a51f43567d16aef89e32cd5137cdbc1
2016-11-17 01:49:50 -08:00
Dan Willemsen
0a37a2a2b8 Encode default enabled state in OsType
Currently our only default-disabled Os is Windows since it's HostCross,
but we'll be adding non-default Host and Device types in the future.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I2bc3a3cc76f2c95ea040bc34ba6706fcc178c68d
2016-11-17 01:49:39 -08:00
Dan Albert
4098deb0b8 Add an NDK ABIs mega build configuration.
The NDK needs generic prebuilts for all architectures.

Test: echo '{ "Ndk_abis": true }' > soong.config && \
          ./soong $OUT_DIR/ndk.timestamp
Bug: None

Change-Id: I2ee3ebbf4cbd1bc593f9e4e9fb44fb66711da9d5
2016-10-19 14:33:37 -07:00
Colin Cross
1e676bef94 Control mutator order
Register mutators inside lambdas that are called in a defined order to
correctly order mutators before and after the arch and deps mutators.

Test: build.ninja identical
Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
2016-10-12 15:33:33 -07:00
Dan Willemsen
0b24c74fcb Disable cc_benchmark for Darwin hosts
The google-benchmark library is disabled on Darwin, so we cannot create
host benchmarks. Instead of having every user specify this, put the
logic in Soong. Then if we decide to support it later, it's an easier
switch.

Test: build.ninja identical before/after on Linux
Test: Ignores failing cc_benchmark_host on Darwin
Change-Id: I61f3a571fd160d8e479a512992bc68601f1c9b28
2016-10-04 15:20:16 -07:00