Move -fdata-sections and -fno-short-enums to global device flags.
-fdata-sections was not previously set on x86[_64], -fno-short-enums
was not previously set on mips[64].
Bug: 68855788
Test: m checkbuild
Change-Id: I68e64888d5414fc022366eb2b6c5cd92c28a5542
It was previously set on arm[64] and mips[64], this will cause it
to be set for x86[_64] too.
Bug: 68855788
Test: m checkbuild
Change-Id: I75af16e7d259963ad633cc664929144332bb435d
Get a list of leaf nodes in the dependency graph
from ninja, and make sure none of them are in the
output directory. This ensures that there are no
rules that depend on a file in the output directory
that doesn't have rule to generate it. The check
will catch a common set of build failures where
a rule to generate a file is deleted (either by
deleting a module in an Android.mk file, or by
modifying the build system incorrectly). These
failures are often not caught by a local incremental
build because the previously built files are still
present in the output directory.
Bug: 36843214
Bug: 68062417
Test: manual
Change-Id: I4933187e8b72f2ef0c32d18ffea756e2c6fa417c
Instead of throwing it away (though it would also be in soong.log along
with the verbose messages).
Test: build/soong/build_test.bash with ctx.Println added
Change-Id: I64f8b11ab6752a6be8a5934fb41e30439238e331
For unbundled builds, LOCAL_SDK_VERSION needs to be set, otherwise we'll
try to use frameworks-res, which isn't available.
Bug: 64723465
Test: Use with prebuilts/sdk/update_current.py
Change-Id: If5e1233b4bcb09b3d0e2251e8dd1a8ecfc87eb19
Bug: http://b/68236396
This warning only needs to be enabled for frameworks/base/core/jni.
Test: Build the topic
Change-Id: I9f6aab2045f135d691696f9fd461c895a5aadb38
This CL adds the ability to centrally enable or disable CFI for
components using either an environment or product config
variable. This is a better, nore manageable option that enabling CFI
across each component individually.
Bug: 67507323
Test: CFI_INCLUDE_PATHS= system/nfc m -j40
Test: CFI_EXCLUDE_PATHS = frameworks/av m -j40
Change-Id: I38b77946759121aec99ab25f31aaee2e5d993f73
in preparation for each task to delete its output dir
before running.
Bug: 38205169
Test: rm out -rf && m -j
Change-Id: Ifcd42073d4fb74f532adc0c095555b4a542feb99
rather than passing buildDir .
This will make it reasonable for sbox to delete its --output-root
Bug: 38205169
Test: m -j
Change-Id: Ic3a82a8df040117870c251c068a88545143257cf
This way config.mk no longer needs to check which java is in PATH and
fix it. It'll be consistent for all build steps under soong_ui.
Also unify handling of ANDROID_JAVA_HOME / JAVA_HOME with
OVERRIDE_ANDROID_JAVA_HOME / EXPERIMENTAL_USE_OPENJDK9.
Test: m nothing
Test: build/soong/soong_ui.bash --make-mode nothing (w/o envsetup.sh)
Test: aosp_arm ninja files are the same before/after
Test: before/after ninja files match with OVERRIDE_ANDROID_JAVA_HOME
Test: before/after ninja files match with EXPERIMENTAL_USE_OPENJDK9
Change-Id: Icdb65093d9c346524074de239a4f895e4230a24d
When the following lines are specified in the BoardConfig.mk
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_VARIANT := generic
The resulted binaries won't be built using 32-bit armv8-a integer
division instructions. Instead, division routines are used because
the build system will set a compiler option "-march=armv7-a", and
hence overwiting the previous "-march=armv8-a", when
TARGET_2ND_CPU_VARIANT is set to generic (or unset).
Bug: 67446726
Test: lunch aosp_arm64; make -j; emulator # boot to home screen
Also verify -march=armv7-a is not specified in the compiler
command line and the resulted binary actually uses integer
division instructions.
Change-Id: I430687aa5a658d2ec9f325a66d849b4c8898c7d5
there's no use case for prepending/appending to bool, and string
properties within module struct. Declearing "*bool" and "*string" almost
cover everything user need.
I did see one case that user specify relative_install_path as
path prefix in cc_defaults, and concatenate with the one in real module
to get the final relative install path in Android.bp <bionic/tests/libs>.
Test: m -j checkbuild
Bug: b/68853585
Change-Id: If3a7a2689c3fc307aae136af6bc9c57f27a1e1a0
Allow functions to get the result associated with a OncePer key without
also specifiying a function. Panics if the key has not already been
set. Also replace the open-coded concurrent map implementation with
the new sync.Map.
Test: m checkbuild
Change-Id: I814fdb1ffffaee8398dc877af146e29638c8a6a8
Move AppendProperties and PrependProperties into TopDownMutatorContext
so that LoadHooks can be a subset of TopDownMutatorContext that also
includes CreateModule.
Test: m checkbuild
Bug: 35570956
Change-Id: Iffa6a6aec96f08821c2446e0e0f4622ab772b54c
Instead of deleting artifacts/logs from successful build (unless -keep
is set), and keeping unsuccessful artifacts, keep all logs and remove
all artifacts (unless -keep is set, then we'll compress the artifacts).
If -dist is passed in, we'll put an archive of the logs into the
DIST_DIR. Even compressed, the rest of the artifacts are still a bit too
large to dist (~5.6GB on AOSP).
Test: build/soong/build_test.bash
Test: build/soong/build_test.bash -keep
Test: build/soong/build_test.bash -dist
Change-Id: I87f55978c18c8ff2e517b8271554ba383003742f
Android Support Library 26+ does not specify dependency types, so parse
all pom files first, then propagate missing dependency types if we've
got the information.
Bug: 64723465
Test: cd prebuilts/maven_repo/android; pom2mk -use-version 26.0.0-beta2 com/android/support
Change-Id: Ieaff757ff198c9a7b4b006623340b382728c1fd4
Strip $PWD/ off the beginning of the path printed by gcc.
Bug: 68719465
Test: m checkbuild
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja -t deps | grep -E '^[[:space:]]*/' | sort | uniq
-fno-canonical-system-headers is required for gcc to use relative
paths to system headers in deps files, and is stripped out for
clang. Move it to the global flags so it affects windows gcc builds.
Bug: 68719465
Test: m checkbuild
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja -t deps | grep -E '^[[:space:]]*/' | sort | uniq
Change-Id: Ia9befd7cf8cfd714241e636fb786c319aecc79fe
* changes:
Remove no_default_compiler_flags property
Move -fomit-frame-pointer to armCflags
Consolidate ldflags that are used on all devices
Remove -Wl,--gc-sections from target flags
Consolidate cflags that are set on all devices
Consolidate global cflags
no_default_compiler_flags is only used by the crt* modules,
is unnecessary, and causes problems when necessary flags like
-no-canonical-prefixes are not passed. Remove the property.
Use useVndk() instead of noDefaultCompilerFlags() to determine
if adding libc as a dependency is necessary and won't cause a
circular dependency.
Bug: 68719465
Test: m checkbuild
Change-Id: Iea1a082dc701dfeab211049a22f7066257347b80