Commit graph

3777 commits

Author SHA1 Message Date
Tobias Thierer
b3f1c8f5f5 Merge "Revert "Build support for 32-bit armv8-a""
am: 9dffe1d807

Change-Id: I4e040ff1e4ec5c12fab4091eead28badf4585a79
2017-08-22 10:36:38 +00:00
Tobias Thierer
9dffe1d807 Merge "Revert "Build support for 32-bit armv8-a"" 2017-08-22 10:30:29 +00:00
Dan Albert
fd7141ee24 Merge "Update the minimum NDK target API."
am: fb5a671c7c

Change-Id: I9c144909a9266d2fb45f77179166891c0874a2bc
2017-08-21 21:23:08 +00:00
Treehugger Robot
fb5a671c7c Merge "Update the minimum NDK target API." 2017-08-21 21:14:25 +00:00
Tobias Thierer
80b27e4e20 Revert "Build support for 32-bit armv8-a"
This reverts commit 9c02066b13.

Reason for revert: Broke the build for some targets (including marlin and angler).

$ make cts
build/core/combo/TARGET_linux-arm.mk:43: kryo is armv8-a.
build/core/combo/TARGET_linux-arm.mk:45: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
[...]
cts/tests/tests/os/jni/android_os_cts_CpuInstructions.cpp:88:20: error: instruction requires: armv7 or earlier
    asm volatile ( "swp r0, r0, [%0]" : "+r"(ptr) : : "r0" );
                   ^
<inline asm>:1:2: note: instantiated into assembly here
        swp r0, r0, [r1]
        ^

Change-Id: I3fa7ca74d88aedf6574855e988d35e341f6e5067
2017-08-21 15:03:26 +00:00
Isaac Chen
2bd5707d7a Merge "Build support for 32-bit armv8-a"
am: 1c508b6c53

Change-Id: I2c5ffff14717e7e71db3619a73bf209530bc396c
2017-08-19 06:16:43 +00:00
Isaac Chen
1c508b6c53 Merge "Build support for 32-bit armv8-a" 2017-08-19 06:10:56 +00:00
Dan Willemsen
68c15ddb2d Obsolete bootstrap.bash and ./soong wrappers
am: 99a75cd2a5

Change-Id: I12a217021354e5ab2812824e9b0209bcce2c9bcc
2017-08-18 22:41:37 +00:00
Dan Willemsen
99a75cd2a5 Obsolete bootstrap.bash and ./soong wrappers
We can call directly into the blueprint bootstrap.bash using values that
soong_ui has already calculated.

Instead of calling into blueprint.bash, build minibp with microfactory,
and directly run ninja. This allows us to get individual tracing data
from each component.

Test: m -j blueprint_tools
Test: m clean; m -j blueprint_tools
Change-Id: I2239943c9a8a3ad6e1a40fa0dc914421f4b5202c
2017-08-18 10:13:22 -07:00
Isaac Chen
9c02066b13 Build support for 32-bit armv8-a
Add armv8-a as a valid/supported 32-bit arm architecture variant. If
some known armv8-a core, like cortex-a53, cortex-a73, etc. is specified
as TARGET(_2ND)_CPU_VARIANT, the associated TARGET(_2ND)_ARCH_VARIANT
will be treated as if armv8-a is specified.

Bug: 62895439
Test: "bionic-unit-tests-static --gtest_filter=*strlen*" on Nexus 4
      (armv7-krait), emulator (armv7), and sailfish (armv8-kryo).
      The test binary for the first 2 is built with armv7-a as its
      TARGET_ARCH_VARIANT; The test binary for the last is built with
      armv8-a as its TARGET_2ND_ARCH_VARIANT.
      TARGET(_2ND)_CPU_VARIANTs of both binaries are set to "generic".

Change-Id: I53bee2974346cf485b2da54cf7aad010b0425910
2017-08-18 19:46:38 +08:00
Dan Albert
990419604a Merge "Expose the minimum supported SDK version to make."
am: fd697f4256

Change-Id: I1a7e7657258e6adbad88f9e51684e8238ab4ed18
2017-08-18 02:44:37 +00:00
Treehugger Robot
fd697f4256 Merge "Expose the minimum supported SDK version to make." 2017-08-18 02:34:36 +00:00
Jeff Gaston
66515e18f5 Merge "Fix Finder out path in multiproduct_kati"
am: bfbb8d242d

Change-Id: Ic00c2d27e9ff4717dc340fa0445ac4978e36c701
2017-08-18 01:50:45 +00:00
Jeff Gaston
a308122994 Merge "Fix androidmk crash if no CLEAR_VARS is detected"
am: d5476b11f3

Change-Id: Idf436e97131b87adae4f9aef179fd508d8af9da5
2017-08-18 01:50:27 +00:00
Jeff Gaston
bfbb8d242d Merge "Fix Finder out path in multiproduct_kati" 2017-08-18 00:54:39 +00:00
Colin Cross
e692428554 resolve merge conflicts of ee41cb8 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
2017-08-17 17:36:57 -07:00
Jiyong Park
ab0fd5f060 List of VNDK-related libs are exported to make
LL-NDK, VNDK-core, VNDK-SP libraries are exported to make as
SOONG_LLNDK_LIBRARIES, SOONG_VNDK_CORE_LIBRARIES, and
SOONG_VNDK_SAMEPROCESS_LIBRARIES. This can be used to auto-generate
ld.config.txt from a template.

Bug: 64013660
Test: BOARD_VNDK_VERSION=current m -j successful
Test: check out/soong/make_vars*.mk and look for SOONG_*_LIBRARIES

Merged-In: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
Change-Id: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
(cherry picked from commit d5b18a55bb)
2017-08-17 17:34:25 -07:00
Treehugger Robot
d5476b11f3 Merge "Fix androidmk crash if no CLEAR_VARS is detected" 2017-08-18 00:19:29 +00:00
Treehugger Robot
ee41cb8116 Merge "Keep vndk library lists sorted" 2017-08-18 00:10:16 +00:00
Colin Cross
2b3cb9cd39 Merge "Revert "Refactor rate_limit.go for more clarify""
am: 1115ddc838

Change-Id: Ic17c986c5058b463b529542588f67eb5e3ac83d5
2017-08-18 00:01:50 +00:00
Colin Cross
1115ddc838 Merge "Revert "Refactor rate_limit.go for more clarify"" 2017-08-17 23:56:00 +00:00
Colin Cross
526416b1e4 Revert "Refactor rate_limit.go for more clarify"
This reverts commit 69f3b3e946.

Caused rare deadlocks.

Bug: 64536066
Bug: 64813447
Change-Id: Ieb1b931bb2c0afdd8bf8edbfc32c373df3c08d8d
2017-08-17 23:54:51 +00:00
Dan Albert
d4db4acffe Update the minimum NDK target API.
Gingerbread is no longer supported. ICS is now the minimum target.

Test: make checkbuild
Bug: None
Change-Id: I896b83d9984d90d907fe518cc722a4a3722626a1
2017-08-17 16:54:21 -07:00
Dan Albert
f5415d7cc6 Expose the minimum supported SDK version to make.
Right now this is hard coded in two places (here and in
core/binary.mk). Keep it in one place so it's easier to change.

Test: make checkbuild
Bug: None
Change-Id: I2a2c784d4c667b326f871e6144db92753c16c85f
2017-08-17 16:54:03 -07:00
Jeff Gaston
15e8e75a05 Fix androidmk crash if no CLEAR_VARS is detected
Bug: 38459493
Test: make blueprint_tools
Change-Id: I968a2e46160c6c04091412e6d5450f9917ec8b67
2017-08-17 15:08:06 -07:00
Colin Cross
766efbc9e9 Keep vndk library lists sorted
soong_build was writing a different make_vars-*.mk on every run
because the lists of vndk libraries were not sorted, causing
kati to regenerate the ninja file.

Test: m -j nothing && rm out/soong/build.ninja && m -j nothing
Change-Id: If1ef51bad602d61a337ee6f62d4758d4123cb00d
2017-08-17 14:57:12 -07:00
Jeff Gaston
743e29ee7c Fix Finder out path in multiproduct_kati
Bug: 64363847
Test: ./build/soong/build_test.bash --dist --keep
Change-Id: I70b08023b94b5789dc8394651bbac4c49c82787f
2017-08-17 14:17:14 -07:00
Jeff Gaston
8c47358417 Merge "Run the Finder and make its results available to Kati"
am: 8cd393688b

Change-Id: I588da94c0f8f21e6fdd2e140b8bf0e5064b65935
2017-08-17 19:48:38 +00:00
Jeff Gaston
8cd393688b Merge "Run the Finder and make its results available to Kati" 2017-08-17 19:40:56 +00:00
Jeff Gaston
7894cbc287 Merge "Refactor rate_limit.go for more clarify"
am: b90afd09d6

Change-Id: I5405c203be4d63bc07ec5bd34cdf9e1e6079e7be
2017-08-17 01:40:13 +00:00
Jeff Gaston
b90afd09d6 Merge "Refactor rate_limit.go for more clarify" 2017-08-17 01:31:21 +00:00
Colin Cross
7d08ced0d1 Merge "Export jar-args.sh script to make"
am: 8a55ec317d

Change-Id: I624dedaec652b167a75afdd39f9fa651fb8bb4be
2017-08-17 01:00:16 +00:00
Treehugger Robot
8a55ec317d Merge "Export jar-args.sh script to make" 2017-08-17 00:48:37 +00:00
Jeff Gaston
69f3b3e946 Refactor rate_limit.go for more clarify
This wasn't intended to change the behavior, but it does slightly.

  Previously any requests to acquire memory wouldn't block; only
  (subsequent) requests for execution would block (if another
  caller had already consumed the memory quota). Now the requests
  for memory can also also block.

It turns out in a brief test on my computer that soong_zip
runs about 10 to 20% faster with this change than without it.

  The final step involving soong_zip decreased from about
  3.6 sec to about 3.3 sec in tests on my computer.

  When testing the process of re-zipping the contents of
  angler-target_files*.zip , the time decreased from about
  6.3 sec to about 5.3 sec in tests on my computer, and the
  peak memory usage reported by `top` decreased from about
  1.5g to 1g

Bug: 64536066
Test: m -j dist showcommands # which runs soong_zip to package everything
Change-Id: I0422e4c363c675bb7a93309fac4616c768bfbe8f
2017-08-16 15:54:25 -07:00
Jeff Gaston
b64fc1cab5 Run the Finder and make its results available to Kati
The Finder runs roughly 200ms faster than findleaves.py in aosp,
and runs roughly 400ms faster in internal master.

Bug: 64363847
Test: m -j

Change-Id: I62db8dacc90871e913576fe2443021fb1749a483
2017-08-16 14:56:00 -07:00
Jeff Gaston
a873c44722 Merge "Have soong_zip add entries for ancestor directories"
am: 16c04e0621

Change-Id: Iaf29cb3adc27ca4450abd52fa9336831ef7535a3
2017-08-16 19:58:55 +00:00
Jeff Gaston
16c04e0621 Merge "Have soong_zip add entries for ancestor directories" 2017-08-16 19:41:27 +00:00
Jeff Gaston
5e13d9d527 Merge "Fail the Finder in case of unexpected fs error"
am: cefa501304

Change-Id: Ia3064ec9c158f6d34428a0de3ee4a4ad0d4f01b3
2017-08-16 02:17:15 +00:00
Treehugger Robot
cefa501304 Merge "Fail the Finder in case of unexpected fs error" 2017-08-16 02:08:34 +00:00
Jeff Gaston
2d174132c4 Have soong_zip add entries for ancestor directories
Bug: 64536066

Test: When I run:

$ mkdir -p a/b/c
$ touch a/b/c/d
$ soong_zip -o test.zip -d -C . -f a/b/c/d
$ zipinfo -1 test.zip
a/b/c/
a/b/c/d

I should get:
a/
a/b/
a/b/c/
a/b/c/d

Change-Id: I779bb48062dfaf88a70fab08d8d98d1e366087b3
2017-08-15 18:57:39 -07:00
Colin Cross
4da8e311d8 Merge changes I18acac41,Ib8baefed,I38e78bb9
am: 972a160062

Change-Id: I829fd57bdee32e2f151b971985308c6e171461aa
2017-08-16 00:25:04 +00:00
Colin Cross
972a160062 Merge changes I18acac41,Ib8baefed,I38e78bb9
* changes:
  Work around LLVM bug where TLS not emulated in LTO mode
  Add LTO support to soong
  Pass correct emulation string to gold
2017-08-16 00:13:00 +00:00
Jeff Gaston
5895aea53a androidmk no longer escaping escaped quotes in CFLAGS
am: fd4ce1bb68

Change-Id: I884a50bd8d8053747ab5ff23d6e2671b3e983450
2017-08-16 00:04:01 +00:00
Jeff Gaston
fd4ce1bb68 androidmk no longer escaping escaped quotes in CFLAGS
Bug: 37547491
Test: m -j

Change-Id: I2f406be477f3990bf109778eb9adc9c33db2f2ad
2017-08-15 22:05:39 +00:00
Colin Cross
ded8a97c32 Export jar-args.sh script to make
Export jar-args.sh in JAR_ARGS so that make doesn't have to
duplicate the sed scripts.

Test: m -j checkbuild
Bug: 64634025
Change-Id: Ia5d0a303f23b32b8ff672fc882d51d5e99316ffa
2017-08-15 14:29:04 -07:00
Jeff Gaston
b629e184dd Fail the Finder in case of unexpected fs error
Permissions errors are ignored
Errors on pruned dirs are also ignored

Bug: 62455338
Test: m -j blueprint_tools # which runs unit tests
Change-Id: I8ba85fdd0295deb7dc374a851212e7c850e76b75
2017-08-15 13:18:24 -07:00
Stephen Crane
f5b9b95f01 Work around LLVM bug where TLS not emulated in LTO mode
In LTO mode the backend constructs a target exclusively from command line flags,
without opportunity to accept code gen arguments from Clang. Clang does not
currently pass the -emulated-tls parameter for Android, even though it defaults
to emulated TLS for Android in non-LTO builds. Until this is fixed upstream, we
can explicitly specify that the LTO output for Android should use emulated TLS.

Test: build libandroid with LTO, verified that it uses __emutls_get_address
rather than __tls_get_addr.

Change-Id: I18acac41aac885fc6635fbd55f96ba7c845eb5e7
2017-08-15 13:18:11 -07:00
Stephen Crane
ba090d16c2 Add LTO support to soong
Enabling the lto property for a module builds that module and all static
dependencies with LTO.

LTO (link-time optimization) allows the compiler to optimize and
generate code for the entire module at link time, rather than
per-compilation unit. LTO is required for Clang CFI and other
whole-program optimization techniques. LTO also allows cross-compilation
unit optimizations that should result in faster and smaller code, at the
expense of additional compilation time.

Test: make -j12 libc with lto: true for libc

Change-Id: Ib8baefedf60e02701d44673a7c473e0845730101
2017-08-15 12:54:12 -07:00
Stephen Crane
b3c2154f2a Pass correct emulation string to gold
Gold recognizes a different set of emulation strings to specify targets
than the bfd linker accepts. Clang only passes bfd emulations to the
linker, so we need to override these with the versions accepted by gold
when using gold.

Gold normally picks up the correct target from the first ELF input file
if it cannot parse the emulation parameter. However when using LTO, all
objects may be bitcode files, which causes gold to rely on the passed
--oformat or -m parameter to determine the proper target. If gold cannot
parse the emulation string passed by clang, it fails to link.

Test: build LTO version of libc

Change-Id: I38e78bb912fd3cc5fb7b4a762284f50ddd4f3998
2017-08-15 12:54:12 -07:00
Colin Cross
776c7730b4 Merge "Convert soong java from soong_zip to jar"
am: 38d3d5d2e5

Change-Id: Ifcd0bd4d69bf466bdc288a6aeb64e74b4351d05f
2017-08-14 22:41:18 +00:00