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
hasSrcExt is used to determine extra flags and dependencies when
generated files are used. If the generated files are being handled
in a static library whose objects are reused in a shared library,
the flags and dependencies still need to apply. Instead of clearing
the source files in the shared library, move them to an OriginalSrcs
property, and check that in hasSrcExt along with the Srcs property.
Also pass extra exported include directories from the static
library to the shared library.
Bug: 37555583
Test: use protos in a cc_library
Change-Id: I709779ec03b66b220b7bd58a1f6f0b9b5067d955
1. Added ability to keep the mixed "-f"/"-l" order as same as
command-line flags order.
2. Added "-s" flag to specify which target file within zip is stored uncompressed.
Test: manual
Change-Id: I338b25a7bd6bf1b7e9cc29ad3324575167630fb7
Allow properties to be overriden by arch variants.
Add include_dirs and local_include_dirs properties.
Pass -I . to fix:
frameworks/base/proto/src/metrics_constants.proto: File does not
reside within any path specified using --proto_path (or -I). You
must specify a --proto_path which encompasses this file. Note that
the proto_path must be an exact prefix of the .proto file names --
protoc is too dumb to figure out when two paths (e.g. absolute and
relative) are equivalent (it's harder than you think).
Test: m -j libplatformprotos
Change-Id: I3e02621ca25bfa7ca0a0e3b83377d70dd352668f
TARGET_USES_HWC2 is going away, but propagate it to soong for now
to unblock converting dependency chains that end in libhwui.
Test: soong tests
Change-Id: I20f1269caea1b5f5fc39239daa6b2e610bd36eb9
References to an MSA architecture feature were added in
I3cadc29434dbd5fdb3aa780198414e90f9572ec5, but never added
to the build system.
Test: builds
Change-Id: I178813824a21475e013f7e8209d9473466ab821c
Generating released API levels and android-current is not sufficient
in a trunk-stable world. One branch will have the stable APIs and
possibly multiple unreleased API levels. We need to generate stubs
for each unreleased API level up to our current target.
I still need to add support for things like `# introduced=O` before
this is really done.
Whether or not we still need something like "current" that would map
to the absolute latest even it hasn't been assigned a code name yet
is uncertain.
Test: make ndk
Bug: None
Change-Id: I282be1347ab39c56fa887d4d71c03bb12c300dc5
* changes:
Enable mips32r2dsp[r2]-fp in mega device build
Turn installation on in mega device build
Prepend arch variant include directories
Make generated_sources act like generated_headers
Pass -I to yasm
Add arm neon and mips dspr2 arch features
I missed this when converting to soong_ui.
Test: m -j blueprint_tools (check soong.log)
Test: SANITIZE_HOST=address m -j blueprint_tools
Change-Id: I01eb567db6848dc36dd679557291a4e600a63bba
Turn on installation in the mega device build, it is necessary for the ndk
sysroot installation. Partially fixes mega device builds, they also need
to run without -w dupbuild=err on the ninja command line because multiple
variants of the same architecture try to install to the same ndk sysroot.
Test: mega device build
Change-Id: I982d77f9ff19f5bc29fc9fe54a0df8db3579c3e3
Arch variant include directories should override existing include
directories, add prepend_variant to the struct tags.
Test: m -j checkbuild
Change-Id: I4a758b42c19481f9496880d29dffea7836f613c5
external/libvpx needs -I flags to be propagated to yasm, but can't
handle all the other global flags (like -no-exceptions). Add -I
arguments to YasmFlags as well as GlobalFlags.
Test: mega-device build of external/libvpx
Change-Id: I1607211c34b031fae8ffc1bd558b26019965a696
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
Clang now generates a SHF_MERGE section that is rejected by GNU as on
Mips64. Change to use integrated assembler for Mips and Mips64.
Bug: 37423073
Test: external/clang/build.py
Change-Id: I8eae5cf370b930119eb6892db960f5f70777312f
This commit add frameworks/opt/net/wifi to root.bp so that
libwifi-system.so can become vendor_available.
Test: mmm frameworks/opt/net/wifi
Bug: 37429084
Change-Id: I98c695ec6b6c3e6788681b5dc243adab4d29d094
This CL disables CFI if both CFI and ASAN flags are enabled. This
allows ASAN to take precedence where needed, preventing build errors
that would otherwise arise.
Bug: 30227045
Test: SANITIZE_TARGET="address" m -j40
Change-Id: Id336bf2bf5498d4c3ea6492e36b366c76c06376e
cmd may be empty if android.Expand fails, and continuing results
in a panic. Return immediately.
Test: m -j checkbuild
Change-Id: Ibf4d57ce048db9f7f16ce118ed9e9ecea5a6551c
frameworks/minikin is being converted, but enough of frameworks/*
is converted to switch to a glob.
Test: m -j checkbuild
Change-Id: I65b49c9661f4507aac9eacd108c9d8a71d272527
We keep having makefiles reading $DISPLAY, and GREP_OPTIONS with
--color=always has caused problems with shell commands in the past.
Bug: 37333696
Test: GREP_OPTIONS="--color=always" m -j
Test: DISPLAY=test m -j (modify an Android.mk to check DISPLAY)
Change-Id: Iafab37d61ecde5c6fdb35a05f18709abc17e8554
Also fix ndk libraries are always re-building. Fix this by having the
build system know the report's file path. This will need to be changed
once we go off "advisory mode" to keep the report if builds fail on abi
breakages.
Bug: 37451651
Bug: 37450828
Test: mm -j64 in bionic/libc produces abi-dumps without warning:
argument unused during compilation: '-Wa,--noexecstack'
Test: cd system/core/init; mma -j; NINJA_ARGS="-d explain" mma -j; The
second mma does not show a dirty libc.so.
Change-Id: I824723fd9e76586831ee2278db0b61329b1475c0
Piping the output of javac through a filter makes it hard to capture
the exit status. Convert it to a wrapper that executes javac and
propagates the exit status.
Bug: 36666657
Test: javac_wrapper_test
Change-Id: I9b56cc3794023aabc9328138a68830e26e980f97
The build system currently uses -fPIC for position independent
libraries, and -fpie for position independent executables. However,
these levels are incompatible and conflict when an executable includes
a static lib with the -fPIC flag - such as when building with
LTO. This CL changes the flag for executables to the compatible -fPIE
instead, which is equivalent for all architectures except PowerPC.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 checkbuild # builds and boots
Change-Id: I95b585b553bc00bc1d4f52f4271c5e30e1007d9b
header-abi-dumper: dumps abi exported by source files for Vndk.
header-abi-linker: links abi dumps produced by header-abi-dumper.
header-abi-diff: compares linked dumps.
Test: mm -j64 showcommands > make_log in bionic/libc.
This produced linked dumps in out/soong/.intermediates.
Copied these dumps to
prebuilts/abi-dumps/ndk/current/arm64/source-based/.
Changed the abi and re-ran mm -j64 showcommands > make_log
confirmed that the build reported compatibility breakge without
actually failing (advisory mode).
Change-Id: Iccad6908fe68a80f47230751671d156893b96ead
Use library.shared() instead of !ctx.static() to avoid installing
header libraries when handling installation in soong.
Test: check build.ninja for installed .a files
Change-Id: I8c59d5845dd32419644b7ccdab3c341bc4bf3617
This CL changes the ENABLE_CFI flag to default to enabled. Setting it
to false will override local settings to enable CFI.
Bug: 30227045
Bug: 22033465
Test: m -j40 works and device boots
Test: cfi is honored unless the global flag is set.
Change-Id: Ie3285c5eac60c8f6012c6b6c23be149a8787af0c
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
Prebuilts may already be stripped. Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.
Bug: 36793128
Test: manual
Change-Id: I9aec008a867eb7df0fbba82b6dd36605dcbf6b9f
There is no need to convert ArchType to a string, it can be used
as a map key directly. It will also be implicity stringified when
passed as a %q parameter to fmt.Errorf.
Test: builds
Change-Id: I5c316fb543108cb88c0c9c1ebafc1bf0050d143e
Builds with no device architectures configured will disable all
device modules, don't run the mutator on them. Avoids panics
in Config.PlatformSdkVersionInt() (because the sdk version is not
set in soong.variables) and in normalizeNdkApiLevel (no arch
mutator was run on the module so arch is "").
Bug: 37315968
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: Iac124e00403eee9f2c1072788e2f51914b0112a5