Commit Graph

5734 Commits

Author SHA1 Message Date
Chih-Hung Hsieh 2c07fc68fd Add default -Werror to cts.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I4900286f75c4f0ee17967085ed7012ddbe6024c9
2017-12-07 11:22:00 -08:00
Chih-hung Hsieh 4b9bb14dd2 Merge "Remove 6 directories from WarningAllowed*Projects." 2017-12-07 17:02:15 +00:00
Treehugger Robot b973cd152e Merge "Add HostToolPath() for Python binary" 2017-12-07 00:43:51 +00:00
Chih-Hung Hsieh b47ac038e8 Remove 6 directories from WarningAllowed*Projects.
Test: normal build
Change-Id: I44381a2a7994d9f74329b0516d2bb303b5866a66
2017-12-07 00:12:35 +00:00
Colin Cross 9e094ebe1d Merge changes from topic "soong_dexpreopt"
* changes:
  Add more dex_preopt properties
  Run gofmt -w
2017-12-06 23:32:36 +00:00
Nan Zhang b8bdacfd0b Add HostToolPath() for Python binary
So in the genrule, Python binary module can be used as tool.

Test: manually write a test genrule.
Change-Id: Idfd3af4c1002dd608e1bdffa203e01c802f1bf21
2017-12-06 15:13:10 -08:00
Treehugger Robot fd2005fc19 Merge "Update pom2mk to allow duplicate module names if rewritten" 2017-12-06 21:39:46 +00:00
Colin Cross 1bd8780881 Add more dex_preopt properties
Move dex_preopt to dex_preopt.enabled, and add dex_preopt.app_image,
dex_preopt.profile_guided, and dex_preopt.profile.  These values will
be passed back to Make if provided to control dex preopting.

Test: m checkbuild
Change-Id: I54a4b1de697a08be20ab65d2a5dc43ce0046692d
2017-12-06 13:27:56 -08:00
Colin Cross 7a6fcbe302 Run gofmt -w
Test: none
Change-Id: I2b503e06a4ae8e72a08f6bfb64692dfd33e2b7e2
2017-12-06 13:19:14 -08:00
Tobias Thierer 38f7173524 Merge "Revert "Default to building with OpenJDK 9 -target 1.8.""
am: c7efdd9b36

Change-Id: Icdbace15dcd4cc5f337b575e98db6265fdf967f2
2017-12-06 14:09:41 +00:00
Tobias Thierer c7efdd9b36 Merge "Revert "Default to building with OpenJDK 9 -target 1.8."" 2017-12-06 14:00:47 +00:00
Tobias Thierer 51512a1848 Merge "Build with OpenJDK 9 -target 1.8 by default except for errorprone."
am: cf8d83de82

Change-Id: Ibe7792469a125f78ef98240f63f2d08047d0e4f1
2017-12-06 11:09:46 +00:00
Tobias Thierer cf8d83de82 Merge "Build with OpenJDK 9 -target 1.8 by default except for errorprone." 2017-12-06 11:05:31 +00:00
Colin Cross 21fafc6298 Split java_binary modules into common and binary variants
am: 6b4a32d771

Change-Id: I6da3e0b26b39e079769dbaed65903416f9fa1ebb
2017-12-06 04:27:01 +00:00
Colin Cross a244a33418 Make (Source|Output)Path.Join("foo").Rel() return "foo"
am: 0db5568612

Change-Id: I6a19550ef017532b2623491938ff000a0e31ac29
2017-12-06 04:26:59 +00:00
Colin Cross 6b4a32d771 Split java_binary modules into common and binary variants
Add a common_first multilib type and use it for java.Binary
so that the java part is compiled as a "common" arch type
but the wrapper script is installed as a "linux_glibc" arch
type.  This allows java_binary to be used as a tool dependency
for a genrule.

Bug: 68397812
Test: TestJavaBinary
Change-Id: I809060839ce8878300da3fb76426ceb1ea6b0e8e
2017-12-06 04:16:21 +00:00
Colin Cross 0db5568612 Make (Source|Output)Path.Join("foo").Rel() return "foo"
This allows TestModule.Output("foo") to be used to find
a file called "foo" that was installed using ctx.InstallFile.

Test: soong tests
Change-Id: I04833c9ee8ac5baa6b6afd35715d1191c1622a78
2017-12-06 04:16:00 +00:00
Colin Cross ac07312f15 Add java_genrules to use jars as inputs and outputs
am: 5425090a4f

Change-Id: I0b6f3b8f04bb5ced5df7b9a985ed5298e8ba2e1e
2017-12-06 04:01:28 +00:00
Colin Cross 799ed60b06 Make TestModule.Output print a list of all outputs on error
am: 9cf27db425

Change-Id: Id3e6b3e4b2faee411753d4e34ce59a3cee2651ac
2017-12-06 04:01:26 +00:00
Colin Cross 5425090a4f Add java_genrules to use jars as inputs and outputs
Add a java_genrule that has the right multilib flags to be a
dependency of a java rule.  Make java libraries implement
SourceFileProducer so that their classes jar can be used as an
input to a java_genrule.  Allow libs and static_libs dependencies
to be a java_genrule.

Test: TestJarGenrules
Change-Id: Ib1b31ef9c0b7e72eeed2c9ecc4ce8a1088e0b1c9
2017-12-06 03:55:20 +00:00
Colin Cross 9cf27db425 Make TestModule.Output print a list of all outputs on error
Debugging when writing tests using TestModule.Outputs is
unnecessarily hard, it panics when an incorrect output path
is given but doesn't provide any help to figure out why.
Follow the pattern used by TestContext.ModuleForTests
and print the list of valid output paths on failure.

Test: m checkbuild
Change-Id: I50e8e2dfc2070bd538d47cf6495a489f727b1564
2017-12-06 03:55:08 +00:00
Chih-Hung Hsieh 875e78c85e Allow warnings in libbufferhub.
am: 809d3f8f63

Change-Id: Ia4c668bbf02fc0a7af7fec12e1f1f1ec3aaabf58
2017-12-06 02:18:46 +00:00
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