Commit graph

4728 commits

Author SHA1 Message Date
Colin Cross
ea3141d06d Move some flags to affect all devices
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
2017-11-14 17:43:24 +00:00
Colin Cross
26f14509d1 Move -fvisibility-inlines-hidden to global device cppflags
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
2017-11-13 15:18:19 -08:00
Treehugger Robot
df93350ccd Merge "Test for dangling rules in make checkbuild" 2017-11-13 22:43:30 +00:00
Colin Cross
7709a05770 Test for dangling rules in make checkbuild
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
2017-11-13 12:47:42 -08:00
Treehugger Robot
bafc47aea6 Merge "Change remaining properties to *string, *bool in Soong." 2017-11-13 19:04:56 +00:00
Treehugger Robot
08bb51cdc5 Merge "Send soong output to std.log in multiproduct_kati" 2017-11-12 01:33:47 +00:00
Dan Willemsen
f196396a1c Send soong output to std.log in multiproduct_kati
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
2017-11-11 15:44:51 -08:00
Treehugger Robot
cc178b3e78 Merge "Re-enable -Wunknown-warning-option" 2017-11-11 13:29:23 +00:00
Colin Cross
62255a7687 Merge "Add presingletons" 2017-11-11 00:53:53 +00:00
Treehugger Robot
dbe8b78a5d Merge "pom2mk: Allow setting LOCAL_SDK_VERSION" 2017-11-10 23:53:44 +00:00
Colin Cross
a0059915d1 Merge "Add OncePer.Get()" 2017-11-10 22:48:38 +00:00
Dan Willemsen
15a8e793f3 pom2mk: Allow setting LOCAL_SDK_VERSION
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
2017-11-10 14:03:48 -08:00
Pirama Arumuga Nainar
4c0e1bf4e0 Re-enable -Wunknown-warning-option
Bug: http://b/68236396

This warning only needs to be enabled for frameworks/base/core/jni.

Test: Build the topic
Change-Id: I9f6aab2045f135d691696f9fd461c895a5aadb38
2017-11-10 13:54:47 -08:00
Nan Zhang
a5e7cb4eab Change remaining properties to *string, *bool in Soong.
Test: m -j checkbuild
Bug: b/68853585
Change-Id: I0fd10ff31e90c1941e80cfbf25e40e9988f1e202
2017-11-09 22:42:32 -08:00
Nan Zhang
ea568a4a24 Change bool, and string properties to *bool, and *string for java,
python, and genrule.

Test: m -j checkbuild
Bug: b/68853585
Change-Id: Ic9a8083818e920dc399a4b00841e2aa496f70faa
2017-11-08 21:25:40 -08:00
Jeff Gaston
99a5635733 Merge "Pass results of Finder into Blueprint" 2017-11-09 03:07:36 +00:00
Vishwath Mohan
1fa3ac552d CFI include/exclude path support (Soong)
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
2017-11-08 18:56:10 -08:00
Jeff Gaston
06643be323 Merge changes I73abb992,Ifcd42073
* changes:
  Have sbox remove its output directory before running
  Consolidate gensrcs implementation into one task each
2017-11-09 00:23:37 +00:00
Jeff Gaston
d3e141de80 Pass results of Finder into Blueprint
Bug: 64363847
Test: m -j

Change-Id: I79db8c524af6e77c35a0199ec1876e5eb94e8971
2017-11-08 23:48:44 +00:00
Jeff Gaston
94cc5662c4 Merge "Have genrule use $genDir as sbox's --output-root" 2017-11-08 23:18:25 +00:00
Jeff Gaston
8a88db5a35 Have sbox remove its output directory before running
Bug: 38205169
Test: m -j
Change-Id: I73abb9921596c96fa056449bdf8250c2928bceda
2017-11-08 13:44:03 -08:00
Dan Willemsen
02c4c1d3f0 Fix mac build
Test: `m nothing` on mac
Change-Id: Ibc377134dbcc5d40263697ef1e79fc31b16e0d1d
2017-11-08 12:50:38 -08:00
Jeff Gaston
437d23c3ad Consolidate gensrcs implementation into one task each
in preparation for each task to delete its output dir
before running.

Bug: 38205169
Test: rm out -rf && m -j

Change-Id: Ifcd42073d4fb74f532adc0c095555b4a542feb99
2017-11-08 12:38:00 -08:00
Jeff Gaston
5acec2b0e0 Have genrule use $genDir as sbox's --output-root
rather than passing buildDir .
This will make it reasonable for sbox to delete its --output-root

Bug: 38205169
Test: m -j
Change-Id: Ic3a82a8df040117870c251c068a88545143257cf
2017-11-08 12:37:14 -08:00
Dan Willemsen
b760f5d638 Merge "Setup java paths in soong_ui" 2017-11-08 20:31:30 +00:00
Treehugger Robot
c7b8e72c91 Merge "Change bool, and string properties to *bool, and *string for cc" 2017-11-08 18:41:33 +00:00
Treehugger Robot
f20e48a9e5 Merge "Add support for test_suites for python_binary_host and python_test_host" 2017-11-08 18:23:16 +00:00
Dan Willemsen
d9e8f0a95a Setup java paths in soong_ui
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
2017-11-08 00:44:47 -08:00
Isaac Chen
2bce8edf34 Generic 32-bit armv8 built as generic armv7 fix
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
2017-11-08 04:17:35 +00:00
Nan Zhang
0007d810e2 Change bool, and string properties to *bool, and *string for cc
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
2017-11-07 15:57:16 -08:00
Colin Cross
d293e65c82 Merge "Let LoadHooks call CreateModule" 2017-11-07 22:49:47 +00:00
Dan Willemsen
4eeb44b83f Merge "Change storage behavior of multiproduct_kati" 2017-11-07 22:25:24 +00:00
Colin Cross
5a79c83893 Add presingletons
Plumb blueprint's presingletons through register.go.

Test: m checkbuild
Change-Id: I5bc0f311740c9220f7afdf2999e6f080f5b0c5ab
2017-11-07 13:36:44 -08:00
Colin Cross
99c6dfaecc Add OncePer.Get()
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
2017-11-07 13:36:44 -08:00
Nan Zhang
c9c6cb77d8 Add support for test_suites for python_binary_host and python_test_host
Test: manually add this property, and then check Android-aosp_arm.mk
Bug: b/35394669
Change-Id: Iddaf677839714daf4f8913ff4bf9e944d38c18db
2017-11-07 13:13:59 -08:00
Colin Cross
519917db89 Let LoadHooks call CreateModule
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
2017-11-07 13:08:36 -08:00
Dan Willemsen
4647be4afe Merge changes Ieaff757f,I5bdbba8d
* changes:
  pom2mk: Fix unlisted dependency types
  pom2mk: Add a flag to specify a specific version of artifacts
2017-11-07 20:59:02 +00:00
Dan Willemsen
e348076296 Change storage behavior of multiproduct_kati
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
2017-11-07 11:30:19 -08:00
Dan Willemsen
5f9d8a6698 pom2mk: Fix unlisted dependency types
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
2017-11-06 20:55:02 -08:00
Treehugger Robot
7feb847418 Merge "Support Javac sharding in Soong." 2017-11-06 23:54:29 +00:00
Treehugger Robot
a632e9f4d2 Merge changes Ie8ecb6c9,Ia9befd7c
* changes:
  Use relative paths in copygcclib.sh deps files
  Move -fno-canonical-system-headers to global cflags
2017-11-06 23:04:09 +00:00
Nan Zhang
61eaedbddf Support Javac sharding in Soong.
Test: m clean && m -j java and java_test.go

Change-Id: I110a0ff029448d3319aed2788d25d90a6c1a7fa0
2017-11-06 14:23:59 -08:00
Colin Cross
d7903535ea Use relative paths in copygcclib.sh deps files
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
2017-11-06 12:56:34 -08:00
Colin Cross
39d450b374 Move -fno-canonical-system-headers to global cflags
-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
2017-11-06 12:56:34 -08:00
Treehugger Robot
9c7dcfd72c Merge "Remove CFI-related WARs that seem no longer necessary" 2017-11-06 20:28:23 +00:00
Jeff Gaston
048bf57c33 Merge "Use flag.Parse in sbox" 2017-11-06 20:08:24 +00:00
Colin Cross
5c9cf6eb84 Merge changes from topic "crt_cflags"
* 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
2017-11-06 18:59:00 +00:00
Alan Leung
a39899edb9 Merge "Always use installed version of d8-compat-dx" 2017-11-06 18:54:53 +00:00
Treehugger Robot
5d37417347 Merge "Add default jar wrapper when wrapper property is not specified" 2017-11-06 18:04:27 +00:00
Colin Cross
87dd963ace Remove no_default_compiler_flags property
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
2017-11-03 22:28:57 -07:00