The order function passed to ExtendMatchingProperites no longer takes
a property, dstValue or srcValue parameter.
Test: builds
Change-Id: I19fc554f705fbf42100f0a38df87e2d1fb2454ec
Mutator contexts are created for every module, and in the case of
transition mutator contexts for every dependency of every module.
Unlike the Blueprint mutator contexts that they wrap, the Soong
mutator contexts can be relatively large. Add global pools for all
of them that can avoid the repeated allocations.
Test: SOONG_PROFILE_MEM=/tmp/mem.pprof m nothing
Change-Id: I64a5f3c91292cff6352300f99c11ac50c713f96d
Some users want to repackage the results of an sdk module.
Genrules have 3 variants: linux, android, and common_os. The common_os
one produces a snapshot zip file that users want. In order to get
access to it, we need a genrule in the same variant, so create
an sdk_genrule for that.
The sdk_genrule shouldn't have linux/android variants either, because
those other variants would get errors when trying to depend on the
sdk modules because the snapshot zip doesn't exist in those other
variants. The code in arch.go needs to be tweaked to allow a common_os
variant without the other variants.
Bug: 315962165
Test: m dist out/dist/art_release.zip
Change-Id: Idc9b3cae7a525d71aed6bafa0f8724a89f75a94b
These will only be provisional, but there are enough different groups
that want *something* to make a start on porting that it's probably
time...
Ignore missing dependencies in build-ndk-prebuilts.sh for now, because
various pieces (that the NDK doesn't care about) are still missing.
Bug: http://b/273792258
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I39202a953a73dc449a10a887d497d09079c43402
This lets us simplify more of our build configuration for stuff like
libm and libz.
Test: treehugger
Change-Id: I823c7df8117f068aeeb7067e8e197863b0fb517f
Add barebones riscv64-linux-android support. This should be enough
to add riscv64-specific entries to Android.bp files, but can't
actually compile anything until there are riscv64 toolchains.
Test: arch_test.go
Change-Id: I0dcc7e797d9352dd38243be908a7f19004ff3db1
Use Target.Os and Target.HostCross as the key in FirstTarget so that
it returns a separate target for host and host cross architectures.
This is useful when host and host cross are both linux_musl, but
host cross is an independenct architecture like arm64.
Also filter the targets returned by ctx.MultiTargets() to match
the HostCross value of ctx.Target() to prevent the newly created
HostCross variants from colliding with Host variants in JNI or
test data attached to Java targets using a common arch.
This relands If75790001afe9d0f9d4d8166f207847851812297 with the
addition of the ctx.MultiTargets() filtering.
Bug: 236052820
Test: TestArchMutator
Change-Id: Ia6fe1185915d174d0ad6b401c227e0e57bee5c24
This reverts commit c5d7ad6b68.
Reason for revert: Speculatively reverting as likely cause of mac build breakage
Change-Id: I30fbbaaac28f3a2fe8bc1c05775d3de248199b29
Use Target.Os and Target.HostCross as the key in FirstTarget so that
it returns a separate target for host and host cross architectures.
This is useful when host and host cross are both linux_musl, but
host cross is an independenct architecture like arm64.
Bug: 236052820
Test: cross compile linux_musl-arm64
Change-Id: If75790001afe9d0f9d4d8166f207847851812297
When trying to build a single 64 bit and 32 bit image, there are
a few executables that are prefer32. When set, this will force all
of those targets to be compiled as 64 bit.
Test: With this option, drmserver/mediaserver are built as 64 bit.
Test: Without this option, drmserver/mediaserver are built as 32 bit.
Change-Id: I1c3dbe229f9b612ff76b857ca7163b14e7dc92c5
Normally the host cross OS is windows, which only builds a few opted-in
modules. When the host cross OS is set to linux_musl it builds all
modules that haven't explicitly opted out, producing linux_musl_common
variants of java modules. Filter these out of javaFuzzPackager to
avoid conflicts with the linux_glibc_common modules.
Host cross common variants targets were missing the HostCross flag,
so also set it in getCommonTargets.
Bug: 236052820
Test: builds with linux_musl arm64 host cross enabled
Change-Id: I58c846076091bee7df50016c240a176c039c42e9
Add toolchains to support cross compiling to aarch64-linux-musl and
arm-linux-musleabihf.
Bug: 236052820
Test: build arm and arm64 musl sysroots
Change-Id: I47a9322929baff2492c6e8db989ece01fcbeb133
Some targets need to be able to specify the specific architecture for a
data_device_bin module. This commit adds new properties to allow
specification of first, both, 32, or 64 multilib properties.
Bug: 231448797
Bug: 232408185
Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary
Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
Stop using linux_glibc properties when musl is enabled.
Bug: 223257095
Test: m USE_HOST_MUSL host-native -k
Change-Id: I63cd485ef64c617bd81f3e598395da21bd71ccbb
Add host_linux to the target properties, which will apply to linux_glibc,
linux_bionic or linux_musl. This will eventually undo the hack that
makes the linux_glibc properties apply to linux_musl.
Bug: 223257095
Test: TestArchProperties
Change-Id: Iccf51ed13c363ce1da04333a277fa49c33d45b9a
Add musl_<arch> and glibc_<arch> properties similar to bionic_<arch>.
Bug: 215802826
Test: m checkbuild
Change-Id: Icfc42ad7b54ee1052f84a46b7c0acffb0a27b236
ModuleBase.generalProperties served the pupose of being a subset
of ModuleBase.customizableProperties. But now with the removal of
the latter, the former is simply a redirection to Module.GetProperties()
Bug: 206961391
Test: m nothing and diff the ninja files
Change-Id: I6dd8b7ba74eb5e7ffb61029b0f9129eec2ccfdaf
- customizableProperties was being used to access all properties,
i.e. basically `GetProperties()`
- generalProperties was a subset of properties,
i.e. `initArchModule()` would only add new arch-specific properties
to `customizableProperties` (and `archProperties`) but not `generalProperties`
This PR sets generalProperties to contain all properties,
which then makes customizableProperties redundant.
And in arch.go, any iteration is done via `archProperties` instead.
Bug: 206961391
Test: m nothing and diff the ninja files
Change-Id: Ieb72b31c0a447fcbf34c92a04f002d7b9d777a86
base.module = module is redundant in InitDefaultsModule() becase of the preceding initAndroidModuleBase()
minor reformat of initArchModel()
Test: m nothing
Bug: n/a
Change-Id: I16d5a400a33098a81ffbf6c81eba5b13db6debf1
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).
Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.
Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.
Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
This just sets up the toolchain and allows Darwin+Arm64 to be specified
as a HostCross target. These variants will not be exported to Make, or
be installed on a Soong-only build. A future CL will add support for
universal binaries using these variants.
This config is a bit stranger than the regular 64/32 multilib, as it's
two primary 64-bit configs. And on a Darwin/X86 machine, the Arm64
versions are HostCross (doesn't work on the current machines), while a
Darwin/Arm64 machine, either version works (if Rosetta is installed).
Bug: 203607969
Change-Id: Iacaed77d267773672da027cd74917e33fb1c1e94
hasArmAndroidArch only checked for 32-bit arm target and thus didn't
work properly on 64-bit only systems.
Test: CtsRsCppTestCases 64-bit only arm on x86
Bug: 194800662
Change-Id: I87332d793dcdd4859766c9067b9fd53f9e4c2516
Soong supports additional arch-variant targets based on arch/os aside
from strictly arch/os names. Handle the unconverted cases based solely
on arch/os.
Test: build/bazel/ci/bp2build.sh
Change-Id: I8dc987b1aa4a4ea646dd5b03a94b84297ba6113a
Also refactor target.bionic to be handled not as its own configuration
axis, but instead to be grouped into os selects handling.
This allows us to remove libbase and its dependencies from the bp2build
denylist.
Test: mixed_droid.sh CI
Change-Id: I92f30074d286306207653fe37589835ae3db16c4
This required the following fixes to bp2build:
- Correctly handle Bionic_* and Linux_* targets
- Correctly handle cc_object's selects
- Generate linker_script, stl, and system_dynamic_deps for cc_object in bp2build
Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: I753fd18df8ae551fb69df07e4174527c5388f289
Refactor arch-handling code to return a "no-config" axis which allows
handling non-arch configed properties the same way as arch-configed
properties.
Test: build/bazel/ci/bp2build.sh
Change-Id: I485b35fd91c28501fe2055234dc9b278488bf4b5
Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.
This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes
for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c.
Bug: 190084016
Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc
Test: TestArchMutator
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.
Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546