Commit graph

5461 commits

Author SHA1 Message Date
Chih-Hung Hsieh
809d3f8f63 Allow warnings in libbufferhub.
* This directory still has warnings.

Test: normal build
Change-Id: Ie322ebf38d828d63e9115308b8e71769fc2a452a
2017-12-05 16:51:22 -08:00
Chih-Hung Hsieh
02c11fa130 Reduce WarningAllowedProjects.
am: 8ca48361ef

Change-Id: Id48dfe471ff908df3e3ec6bc4dab8d7e3466fbaf
2017-12-05 23:04:34 +00:00
Alan Viverette
75b95f8a61 Update pom2mk to allow duplicate module names if rewritten
Fixes: 70162730
Test: ./update_current.py -s -t 4482279
Change-Id: I874d7bfb50fd2d2bc488f5458cfe57b2e0d4d4e5
2017-12-05 12:53:44 -05:00
Chih-Hung Hsieh
8ca48361ef Reduce WarningAllowedProjects.
* Warnings were fixed or suppressed in these projects.

Test: normal build
Change-Id: I24ef1b59d6c5ccd50979b7d792764de9d6da7e30
2017-12-05 09:12:35 -08:00
Jeff Gaston
40573a7456 Merge changes from topic "soong-namespaces"
am: 73c2099534

Change-Id: I75fa176c2fa545811bf14500c23f55d7426aa439
2017-12-05 03:55:25 +00:00
Jeff Gaston
3f51258096 require namespaces to be declared only in files named Android.bp
am: 5c3886de5a

Change-Id: I41b69b310e9051f07533962f2c90c2ef311051fc
2017-12-05 03:55:17 +00:00
Jeff Gaston
dc1a9a8eb4 Document Soong namespaces
am: 44c0cd8543

Change-Id: Ice8ea9a9682121d0530d59aa482f50f0b21737ed
2017-12-05 03:55:07 +00:00
Jeff Gaston
994f9e7a92 Revert "Revert "Soong support for namespaces""
am: 088e29ed38

Change-Id: Id969fc05530600bbde27282c3035ad75e6e46a0e
2017-12-05 03:54:51 +00:00
Jeff Gaston
73c2099534 Merge changes from topic "soong-namespaces"
* changes:
  Make ninja file deterministic even with dup module names
  require namespaces to be declared only in files named Android.bp
  Document Soong namespaces
  Revert "Revert "Soong support for namespaces""
2017-12-05 03:48:20 +00:00
Jeff Gaston
4f9834d119 Merge "Have diff_build_graphs.sh print the number of lines in the diff"
am: 7c25d88e6b

Change-Id: I809ac491b2a6b9bca8c9683df421c21dbd6b12e1
2017-12-05 02:16:37 +00:00
Tobias Thierer
7c05949407 Revert "Default to building with OpenJDK 9 -target 1.8."
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.

This revert is being prepared ahead of time in case of
any problems with original change topic,
https://r.android.com/#/q/topic:bug_69449021

Bug: 69449021
Test: Treehugger

This reverts commit 0ae8b548af.

Change-Id: Ief7646a94f1a264085cd299b4327d244b78a1537
2017-12-05 02:10:55 +00:00
Tobias Thierer
0ae8b548af Build with OpenJDK 9 -target 1.8 by default except for errorprone.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.

This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.

Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.

To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false

Bug: 69449021
Test: Treehugger
Test: "make core-oj", checked that compilation now uses
      OpenJDK 9 javac -target 1.8
Test: Checked that this is still compiled using OpenJDK 8.
      export EXPERIMENTAL_USE_OPENJDK9=false
      make core-oj

Change-Id: Ic87e9bb2a2e5da0ff13a2e51845b5365901c1507
2017-12-05 02:07:30 +00:00
Treehugger Robot
7c25d88e6b Merge "Have diff_build_graphs.sh print the number of lines in the diff" 2017-12-05 02:04:29 +00:00
Jeff Gaston
5c3886de5a require namespaces to be declared only in files named Android.bp
Bug: 65683273
Test: m -j nothing # which runs unit tests

Change-Id: I5edf0e0482809f5ac9fb9dfff342fb404e1c52da
2017-12-04 17:44:32 -08:00
Jeff Gaston
44c0cd8543 Document Soong namespaces
Bug: 65683273
Test: Read README.md

Change-Id: I179c085e123858ae425515ac6bbf4b272c245a2e
2017-12-04 17:44:32 -08:00
Jeff Gaston
b274ed3252 Make ninja file deterministic even with dup module names
Bug: 65683273
Test: ./build/soong/scripts/diff_build_graphs.sh \
      --products=aosp_arm '' ''

Change-Id: Ie01ff579d69e94b12363f53aec5d25810211c451
2017-12-04 17:44:32 -08:00
Jeff Gaston
088e29ed38 Revert "Revert "Soong support for namespaces""
This mostly reverts commit 178d5fefc0
and mostly reapplies change I6d3e52ef62c4cabe85b9a135a54de0e1a6aab29c .

Bug: 65683273
Test: build/soong/scripts/diff_build_graphs.sh \
      --products=aosp_arm \
      'build/blueprint:work^ build/soong:work^' \
      'build/blueprint:work build/soong:work'
      # and see that the only changes were:
      # 1. adding some new files
      # 2. changing some line numbers
Test: m -j nothing # which runs unit tests

Change-Id: I32baae00277a547fdcdd1c2219fe6625ee0e45d7
2017-12-04 17:44:29 -08:00
Justin Yun
702a40d5cd Install VNDK snapshot libraries for system build
am: 7154928c93

Change-Id: I5320a9aa79cfac4d30ade0db1d2c901d03055c1a
2017-12-05 01:38:26 +00:00
Chih-Hung Hsieh
7197aaee21 Merge "No need to dump modules added -Werror."
am: 5760c9a12c

Change-Id: I465d2534cdbf351aed1c7c06966518f199391ea0
2017-12-05 01:20:34 +00:00
Justin Yun
7154928c93 Install VNDK snapshot libraries for system build
When BOARD_VNDK_VERSION := <VNDK version>, or
PRODUCT_EXTRA_VNDK_VERSIONS includes the needed <VNDK version> list,
the prebuilt VNDK libs in prebuilts/vndk/ directory will be
installed.

Each prebuilt VNDK module uses "vndk_prebuilt_shared" for shared
VNDK/VNDK-SP libs.

Following is the sample configuration of a vndk snapshot module:
vndk_prebuilt_shared {
    name: "libfoo",
    version: "27",
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    arch: {
        arm64: {
            srcs: ["arm/lib64/libfoo.so"],
        },
        arm: {
            srcs: ["arm/lib/libfoo.so"],
        },
    },
}

The Android.bp for the snapshot modules will be auto-generated by a
script.

Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: set BOARD_VNDK_VERSION := 27
      copy a snapshot for v27
      build with make command

Change-Id: Ib93107530dbabb4a24583f4d6e4f0c513c9adfec
2017-12-05 10:19:43 +09:00
Treehugger Robot
5760c9a12c Merge "No need to dump modules added -Werror." 2017-12-05 01:09:33 +00:00
Dan Willemsen
3fd18650fb Make setup_go_workspace_for_soong work on Mac
am: 932ecc1a97

Change-Id: Ic981d1a982dadd4604797e470ea1bfe427987be7
2017-12-05 01:05:14 +00:00
Chih-Hung Hsieh
fa0e27a1f3 No need to dump modules added -Werror.
* This reduces size of output file wall_werror.txt.
* Stop collecting SOONG_MODULES_ADDED_WERROR.

Bug: 66996870
Test: normal build
Change-Id: Ic6d87f6ee2b36b90ad0de4ac4f6f176334aba55e
2017-12-04 15:30:26 -08:00
Dan Willemsen
932ecc1a97 Make setup_go_workspace_for_soong work on Mac
Test: build/soong/scripts/setup_go_workspace_for_soong.sh on Mac and Linux
Change-Id: Idfcad3ace6f3ff4b68a438b8f1e0d94ff35573e0
2017-12-04 14:58:00 -08:00
Colin Cross
c9a8134399 Fix builds outside of make
am: e15ddaf4ae

Change-Id: I2d313af3ec290d38b32361785b4a41d508e4aae4
2017-12-04 21:13:16 +00:00
Colin Cross
e15ddaf4ae Fix builds outside of make
Builds outside of make use custom config files that may not set
some variables, which is causing nil pointer derefernces.  Use
wrapper functions that check for nil for the new config
variables.

Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I0f837094532aeb2ecdbe401affa55a7535075bf6
2017-12-04 11:24:31 -08:00
Colin Cross
ad843bce95 Fix apps build
am: 42f3a76f00

Change-Id: I335bfc9b17f3564e1d4714706983406374994e7d
2017-12-03 02:13:20 +00:00
Colin Cross
42f3a76f00 Fix apps build
Fix two problems with Soong's aapt2 rules that occur when
TARGET_BUILD_APPS is set.  Fix escaping the values passed to
--min-sdk-version, they are sometimes P-$$(cat out/build_number.txt).
Also use the correct path to the aapt2 prebuilt.

Bug: 69917341
Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_APPS=Camera2
Change-Id: I8660a62c4a87a74e0ac1b9d03d67103af93a0cbe
2017-12-03 00:26:39 +00:00
Colin Cross
9d58bf0610 Use default app certificate from Make
am: 61ae0b7eed

Change-Id: I272e259e0988add4648cf43eb66c1fb159714081
2017-12-02 04:46:20 +00:00
Colin Cross
61ae0b7eed Use default app certificate from Make
Bug: 69917341
Test: m checkbuild
Test: framework-res.apk is identical after converting to Soong
Change-Id: I6980afd94ea130740da0defeea045eddc2fc6439
2017-12-02 01:26:50 +00:00
Jeff Gaston
36ae868271 Merge "sbox error message now lists the files that were created"
am: a1a966734c

Change-Id: I53a7fe66c3309e9c0a381442ac295b5ac09ed35a
2017-12-02 00:50:53 +00:00
Treehugger Robot
a1a966734c Merge "sbox error message now lists the files that were created" 2017-12-02 00:45:35 +00:00
Nan Zhang
ebb3872759 Merge "Revert "Revert "Change Python in Soong to support device side build."""
am: 57f1406acc

Change-Id: Ied62058570d90518b007957f07f0c8e6853a4a7f
2017-12-01 23:46:18 +00:00
Nan Zhang
57f1406acc Merge "Revert "Revert "Change Python in Soong to support device side build.""" 2017-12-01 23:42:39 +00:00
Colin Cross
77a57a97ac Sort compiled resources by output path
am: b69301ee96

Change-Id: Ib5649aa675cdd90b10650a5811e1ee383322052c
2017-12-01 22:12:38 +00:00
Colin Cross
4713d17c35 Add enforced RRO support to Soong
am: 890ff551f7

Change-Id: Iabde599deb849c8252b65d7e5f9e2438fddb31f0
2017-12-01 22:11:21 +00:00
Jeff Gaston
90cfb09214 sbox error message now lists the files that were created
which should make debugging faster.

Bug: 66921582

Test: ./out/soong/host/linux-x86/bin/sbox --output-root outs --sandbox-path out/.temp/sbox-work -c "cd __SBOX_OUT_DIR__ && mkdir asubdir && mkdir b && touch asubdir/child a b c d e f g h i j k l m n o p" outs/a outs/b outs/z # and observe the below output:

mismatch between declared and actual outputs
in sbox command(cd out/.temp/sbox-work/sbox343858828 && mkdir asubdir && mkdir b && touch asubdir/child a b c d e f g h i j k l m n o p)

  in sandbox out/.temp/sbox-work/sbox343858828,
  failed to create 2 files:
    b: not a file
    z: does not exist
  did create 16 files:
    a
    asubdir/child
    c
    d
    e
    f
    g
    h
    i
    j
    ...6 more

Change-Id: I75e37834c44d4279dec874701d67ce8bb01b872c
2017-12-01 13:21:35 -08:00
Nan Zhang
d9ec5e7dea Revert "Revert "Change Python in Soong to support device side build.""
This reverts commit 0a32e5936b.

Reason for revert: <libsqlite was missing for darwin_x86_64 before>

Change-Id: I2e13e849a503a705ffad425df292380f2f73954e
2017-12-01 20:00:31 +00:00
Colin Cross
b69301ee96 Sort compiled resources by output path
Soong was keeping the compiled resources in the same order as the
input resources, which are sorted lexicographically. Converting the
path names in pathsToAapt2Paths results in a list that is no longer
lexicographically sorted.

Make sorts the inputs to aapt2 link by compiled resource name, so
do the same in Soong.

Bug: 69917341
Test: no change to framework-res.apk when converting to Soong
Change-Id: I29e8339b9969b0d323d469dac140c7e172b7ebfa
2017-12-01 19:16:42 +00:00
Colin Cross
b76a63e054 Split up testJavaWithEnvFs
am: 527012af07

Change-Id: I62d073c9c3810865bc1a24f142319180ae85a96d
2017-12-01 16:32:29 +00:00
Colin Cross
890ff551f7 Add enforced RRO support to Soong
Ignore overlay directories that have been selected for enforced RRO
by the product, and pass them to Make instead to be converted to
an auto generated RRO package.

Bug: 69917341
Test: m checkbuild
Change-Id: I8e2677f4c600acdd8dee0869bf4fbc3d5dbc8b44
2017-12-01 16:12:51 +00:00
Colin Cross
527012af07 Split up testJavaWithEnvFs
Instead of passing all the options to testJavaWithEnvFs, split it
up into testConfig, testContext, and run.  Tests that don't need
any special options can continue to use testJava, more complicated
tests can call the three functions manually.  This gives more
flexibility in complicated tests for the next patch.

Test: soong java tests
Change-Id: Ifd5dcb40cf08e4cbf69bf8e02c5698adbfbcdcb3
2017-12-01 16:12:03 +00:00
Nan Zhang
6625526e85 Merge "Revert "Change Python in Soong to support device side build.""
am: 6ff00ed273

Change-Id: I36eb5ec0a903cd748647820a1d7fcaacffbc322e
2017-12-01 06:30:40 +00:00
Nan Zhang
6ff00ed273 Merge "Revert "Change Python in Soong to support device side build."" 2017-12-01 06:26:40 +00:00
Nan Zhang
0a32e5936b Revert "Change Python in Soong to support device side build."
This reverts commit 3bba05962d.

Reason for revert: <revert mac builds>

Change-Id: I25f1380573d69f7e111287624a2d4a3d95fdd86b
2017-12-01 06:19:27 +00:00
Sundong Ahn
ccb9e107a8 Merge "Add system_$(VER)"
am: 9c9540d008

Change-Id: I39e3a4ac7c47d918b52f0a4bd22a7c03009cf8a1
2017-12-01 04:25:34 +00:00
Treehugger Robot
9c9540d008 Merge "Add system_$(VER)" 2017-12-01 04:19:45 +00:00
Dan Willemsen
1ef719f19c Merge "Add base variables for windows clang"
am: d0704cf7fa

Change-Id: I37d1e0b151976f44d942a994b9335d6e75917362
2017-12-01 02:58:21 +00:00
Treehugger Robot
d0704cf7fa Merge "Add base variables for windows clang" 2017-12-01 02:52:27 +00:00
Nan Zhang
6a505f65ad Merge "Change Python in Soong to support device side build."
am: 6825c25d6e

Change-Id: I01adcfec4515cba43cd24cb96e6a3110250981b5
2017-12-01 02:28:21 +00:00