Commit graph

9114 commits

Author SHA1 Message Date
Dan Willemsen
174feb906f Remove (C|CPP|CONLY|LD)FLAGS checked by Soong
At the beginning of every build, Soong has exported its version of these
variables, and has been ensuring that when sorted, the result is the
same. So these variables all have the same flags of the Soong ones, but
may be in different orders. We don't believe any of the remaining order
differences matter. As we remove the Make definitions, the exported
Soong variables will take over.

This only removes lines that change one of these variables:

  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_LDFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_LDFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_LDFLAGS

Many other variables are unnecessary now too, but those will be removed
in another change. For those we can ensure the build.ninja file does not
change, but we expect it to change here due to the ordering differences.

Change-Id: I0bd0778706d02ee27b2784dd8dc6b2c71d37bd3a
2016-05-18 18:10:04 -07:00
Dan Willemsen
3fe3248c36 Windows: Stop adding to GLOBAL_LD_DIRS
Soong does not have the idea of global linking directories, so move the
windows prebuilt library directory to GLOBAL_LDFLAGS instead.

Change-Id: Ie101146f4682cd85924463aa5acaa46869938e6c
2016-05-18 16:50:46 -07:00
Dan Willemsen
6864e3790c Merge "Remove trailing newline from TARGET_C_INCLUDES" 2016-05-18 23:50:27 +00:00
Dan Willemsen
5baaba771c Remove trailing newline from TARGET_C_INCLUDES
In preparation for comparing with the Soong variable.

Change-Id: I159507757ed7678a33a3c94e6d01d170485e251a
2016-05-18 15:38:04 -07:00
Dan Willemsen
8308f506ce Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS
We never use it for host modules, and all the target configurations use
the same linker argument. This matches Soong.

Change-Id: Ibcba9a4ce340c7a12306d1fee620a04027c0e292
2016-05-18 12:50:53 -07:00
Dan Willemsen
30b57cd7d5 Merge "Remove make variables exported from Soong" 2016-05-18 00:36:46 +00:00
Dan Willemsen
cba1557476 Pass BUILD_HOST_static to Soong
Change-Id: I0ac43a1dedf20e5251e05f12d120d0e6e2e1b1ee
2016-05-17 16:40:03 -07:00
Dan Willemsen
7701eaa5b2 Remove redundant clang cppflags
Cppflags always get added to cflags, so we don't need to duplicate clang
cppflags extras that are already in the clang cflags extras

Change-Id: Ic099f565f20fd993fc0713c033fbc5154373c98f
2016-05-17 00:42:41 -07:00
Shinichiro Hamaji
f0a465c2cb Merge "Make apks depend on their certificates" 2016-05-17 03:58:32 +00:00
Dan Willemsen
4863dafcb1 Remove make variables exported from Soong
These have all been strictly checked by Soong, so the values currently
match. Just remove them so that the make variables exported by Soong
will take over.

This also removes some of the GCC reconfiguration, since we haven't
implemented that in Soong. If it becomes useful in the future, we'll
implement it there.

Some things like TARGET_TOOCHAIN_ROOT can nearly be removed, but are
used before the Soong-exported make_vars.mk is loaded. In that case,
added to the clang cflags, so it can be removed once the cflags are
removed.

Others, like LLVM_PREBUILTS_VERSION are loaded even earlier -- in
envsetup.sh before we've even configured Soong. So for now, keep the
Make definition, and continue ensuring it's the same as the Soong
version.

Change-Id: I554b27062ac43610828a8c06d640d919a2dc21ca
2016-05-16 20:39:58 -07:00
Dan Willemsen
db16dd2384 Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV
Instead, use the libgcc/libatomic/libgcov from the static libraries dir,
which is provided by Soong. Copy the libraries using the Soong script if
Soong is disabled - this can be removed once USE_SOONG is removed.

Change-Id: Iad2ad20ad5c3cfc48bf1e46e594a482609098d7a
2016-05-16 17:26:54 -07:00
Dan Willemsen
5b188fb539 Soong: Read Android.soong.mk if skipping Android.mk
If Soong is enabled, and we're skipping an Android.mk because there is
an Android.bp file, check for an Android.soong.mk file and read that
instead. This will allow us to temporarily define modules or recurse
into subdirectories that soong does not yet support.

Change-Id: Ifdb2f0204a38a5069e53527f66ffcfb8008c11a4
2016-05-13 16:10:41 -07:00
Colin Cross
ac33935ac1 Merge "Default USE_SOONG to true" 2016-05-13 22:40:23 +00:00
Dan Willemsen
439f4dd189 Merge "Don't use GTEST_OS_LINUX on Darwin" 2016-05-13 22:29:16 +00:00
Evgenii Stepanov
7f13ab998a Pass USE_SAFESTACK to Soong.
Change-Id: I51a94da0942aa1a1e003c134a30e8da82e1270b8
2016-05-13 14:40:58 -07:00
Dan Willemsen
66fced615f Don't use GTEST_OS_LINUX on Darwin
Change-Id: If77118591daa7b474e6989e03109ea32ddd357b2
2016-05-13 21:10:50 +00:00
Shinichiro Hamaji
641e61cb53 Make apks depend on their certificates
Bug: 27954979
Change-Id: I02db576cb80cbb9dd684d931da02e1b3b3efdf37
2016-05-13 16:03:24 +09:00
Shinichiro Hamaji
4c4c06016b Merge "Follow symlinks when using find for assets" 2016-05-13 05:20:05 +00:00
Dan Willemsen
8b999ac63d Read Soong-exported configuration
This is to ensure that Make and Soong agree on configuration variables
like TARGET_GLOBAL_CFLAGS. Only a few variables are actually checked
currently until we make more actually the same.

Bug: 23566674
Change-Id: Ibede43d933ede4d470e182f9490ea6ec4ef52fbc
2016-05-12 13:36:33 -07:00
Dan Willemsen
f100d01dd5 Merge "Use product-specific Soong outputs" 2016-05-12 20:33:05 +00:00
Shinichiro Hamaji
d8f9f7d873 Follow symlinks when using find for assets
This should have been done in
https://android-review.googlesource.com/#/c/43901/

Bug: 27954979
Change-Id: I663b5e87e0d844d37a59e404219ff5e7e364df74
2016-05-12 18:17:02 +09:00
Shinichiro Hamaji
b6f2c8fac8 Merge "Correct some dependencies around zip packages" 2016-05-12 02:06:42 +00:00
Treehugger Robot
648ea82b04 Merge "Include BRILLO_VENDOR_PARTITIONS in target zip generation" 2016-05-11 21:49:56 +00:00
Chih-Hung Hsieh
e1ea9434c1 Add misc-macro-parentheses to default tidy checks.
* Disable this check in external projects.

Bug: 28705665
Change-Id: Ia44a15765fd637dae36b5e0f2b59ee4280b139c9
2016-05-11 13:43:11 -07:00
Wei Wang
2e735ca34e Include BRILLO_VENDOR_PARTITIONS in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

The target zip will include images in BRILLO_VENDOR_PARTITIONS if
defined, under VENDOR_IMAGES/ with path kept. Also any vendor partitions
defined in AB_OTA_PARTITIONS will be copied to IMAGES/ in the target zip.

BUG: 28623063
Change-Id: Ic479048dfb8ac506acf827865e784fcb0432a1d5
2016-05-11 12:26:04 -07:00
Shinichiro Hamaji
ee2d21195c Correct some dependencies around zip packages
Add scripts which creates these packages to their dependencies.
$(SYMBOLS_ZIP) contains symbol info of the updater binary so
it should depend on it.

Bug: 27954979
Change-Id: If78746ec843dd57fe5fdda3ed504a12bb298ea1d
2016-05-12 02:07:56 +09:00
Tao Bao
7ff7c2d870 Merge "Revert "Include vendor partitions in target zip generation"" 2016-05-11 15:11:57 +00:00
Wei Wang
05e6f679e6 Revert "Include vendor partitions in target zip generation"
This reverts commit 421fe44ae8.

Change-Id: Id45781de73735783bc7dfb6fc2838957578d00d3
2016-05-11 14:49:50 +00:00
Dan Willemsen
57aa920ddb Use product-specific Soong outputs
This way, when switching between two products, we don't need to re-run
kati.

Change-Id: I0a8b3b49f1b76d9e120ea93bb5d2aa06cd189679
2016-05-11 00:40:43 -07:00
Treehugger Robot
bb05fd768c Merge "Include vendor partitions in target zip generation" 2016-05-11 02:18:58 +00:00
Dan Willemsen
19b7692496 Merge "Add a 32-bit x86_64 arch variant" 2016-05-11 00:35:59 +00:00
Dan Willemsen
9826900aea Do not apply -Wl,--fix-cortex-a8 to Cortex-A9
Change-Id: I11d380163423cb4aa0fee60ecbaa1e38fa5143a1
2016-05-10 15:36:58 -07:00
Dan Willemsen
04aa521eca Add a 32-bit x86_64 arch variant
The current 32-bit configuration for generic x86_64 targets inherits some
variables (SSE4 support) from the 64-bit configuration, and overrides
the make variables used for other configurations (SSSE3). Ideally, these
would be using different variables, but until then, unify the
configuration for x86_64 targets so that everything is consistent.

Bug: 28694691
Change-Id: I47e67299d4c632e7491d7e73dc0fc6480ef08006
2016-05-10 14:15:41 -07:00
Wei Wang
421fe44ae8 Include vendor partitions in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

BUG: 28623063
Change-Id: I6e0969c31c9ad2e8285c6f560825c160aa8c4d55
2016-05-10 11:00:09 -07:00
Dan Willemsen
af14b921af Merge "Fix build system documentation example" 2016-05-09 23:37:44 +00:00
Treehugger Robot
f948dddfe0 Merge "Remove -mcpu=cortex-a15 when adding -mcpu=krait" 2016-05-09 22:43:09 +00:00
Dan Willemsen
136fa4377d Merge "Revert "[MIPS] Temporarily disable Mips shared-textrel errors"" 2016-05-09 22:09:42 +00:00
Dan Willemsen
aeadf41e69 Remove -mcpu=cortex-a15 when adding -mcpu=krait
This is not necessary, since the later -mcpu=krait will override the
earlier -mcpu=cortex-a15, but is cleaner (and matches Soong).

Change-Id: I18301faf8a5cb5364617b3008bc8af461b7884f8
2016-05-09 14:55:10 -07:00
Dan Willemsen
593e670602 Revert "[MIPS] Temporarily disable Mips shared-textrel errors"
This reverts commit 3dfd20aea4 - the clang
version we are using has the mentioned permanent fix. The new build
system (Soong) uses a single list of unknown clang flags for all
architectures, so workarounds like this no longer work.

Change-Id: I64a83f3b52a9ca1d11a76df5a060a36f42e27e4b
2016-05-09 13:10:05 -07:00
Dan Willemsen
bdd2e8ebf9 Fix build system documentation example
The input and output file paths were mixed up in this example. Properly
indicate the input file as a dependency.

Change-Id: I71271025c6ce3ef8f82b10aee91fc0c7ae8f2399
2016-05-08 19:24:58 -07:00
Dan Willemsen
db14f793bc Remove arm-specific -Wno-psabi
This flag was added to stop a GCC 4.4 specific warning. Since we've
upgraded, this flag is no longer necessary. It's already stripped for
clang builds, and I found no instances in the logs after removing it.

Change-Id: If5316d2eb8066dc43d7af7aebc7e4920b4ada192
2016-05-06 17:08:24 -07:00
Treehugger Robot
622b3c2764 Merge "Harden dependency on generated sources." 2016-05-06 20:16:41 +00:00
Elliott Hughes
e6710e9b90 Merge "Avoid accidentally using the host's native 'as' command." 2016-05-06 20:11:45 +00:00
Ying Wang
05f9f35836 Harden dependency on generated sources.
Previously if a library has custom generated headers in
LOCAL_GENERATED_SOURCES and export its include path with
LOCAL_EXPORT_C_INCLUDE_DIRS, there is almost no way for the users of the
library to set up dependency of their object files on the generated
headers.
This change makes the generated sources dependency of the library's
export_includes, which is guaranteed generated before client code gets
compiled.

Also we added proto-generated cpp files to my_generated_sources so that
we can deal solely with $(my_generated_sources). Because many
Android.mks assume the generted .pb.hs are in $(generated_sources_dir)
instead of $(intermediates), we have to generate the source files in
$(generated_sources_dir) and make a copy in $(intermediates).

Bug: 28622149
Change-Id: I73b21443fa706f3735faf16356ed8c08fbfecca6
2016-05-06 10:20:17 -07:00
Dan Willemsen
9a97ba700b Only pass NINJA_ARGS to the main ninja compile
This way commands like "-t query <target>" will work against the main
build, instead of failing to find the target during the initial soong
build and stopping.

Change-Id: I9b6bd6ac431b95e12db69ec7f272669b9d292761
2016-05-05 16:55:21 -07:00
Colin Cross
42a5da7ca1 Default USE_SOONG to true
Change-Id: Iad88aed4060b84aef2381f6300f16bad14f3a6ca
2016-05-05 16:34:58 -07:00
Alistair Strachan
5ff9c81b6c Avoid accidentally using the host's native 'as' command.
When invoking clang for the host to assemble .S files, the -B flag
would not be provided, which allowed the host prebuilt clang to
use an 'as' from the native environment. Most of the time this
"just works", but some newer 'as' versions cause problems with
the older prebuilt toolchain, for example by generating
unsupported relocation types.

To avoid this problem, simply use the -B flag to tell clang to
invoke the assembler from the correct prebuilt gcc prefix.

Change-Id: I18ea4f37ae637b652cfd7321c41929f8be075342
Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
2016-05-05 16:29:08 -07:00
Colin Cross
405b73ea10 Merge "Update prebuilt build tools path" 2016-05-05 18:54:37 +00:00
Colin Cross
c9778e339d Merge "Pass SANTIIZE_HOST and SANITIZE_TARGET to soong" 2016-05-04 23:34:54 +00:00
Colin Cross
facdca17d5 Update prebuilt build tools path
Build tools have been moved from prebuilts/sdk/tools to
prebuilts/build-tools.

Bug: 27857138
Change-Id: I60be42c197d420897dab77808c25818c9d2e81df
2016-05-04 16:02:02 -07:00