Commit graph

5466 commits

Author SHA1 Message Date
Jiyong Park
a46a4d5a13 Fix: duplicated definition of llndk_headers module
A llndk_headers module was double defined; one as a header lib and the
other as a static lib. Since llndk_headers is a header lib, the static
lib is now deleted.

Bug: 70617292
Test: build. (TestLlndkHeaders added)
Change-Id: I1a3e9d1a73616ea4faf03664a7a4b03bd5955629
2017-12-14 21:28:53 +09:00
Chih-Hung Hsieh
7dd8778e48 Add default -Werror to frameworks/webview/chromium.
Bug: 66996870
Test: normal build
Change-Id: Ifb3a44dd073dd7f028295e102bd561feaf98cf26
2017-12-12 17:57:57 -08:00
Chih-hung Hsieh
e41f450a35 Merge "Add default -Werror to libbufferhub" 2017-12-13 01:53:46 +00:00
Justin Yun
8fe1212261 Install current VNDK libs to the versioned directories.
If PLATFORM_VNDK_VERSION has a version $VER other than "current",
install current VNDK libs to /system/lib[64]/vndk[-sp]-$VER.
Otherwise, they will be installed to /system/lib[64]/vndk[-sp].

Bug: 69883025
Test: device boot
Change-Id: Ifa8564f39687dab5b407bf2178b13022625a94f3
2017-12-13 10:47:44 +09:00
Treehugger Robot
160cdbe773 Merge "Add myself as an owner for NDK things." 2017-12-13 01:35:47 +00:00
Chih-Hung Hsieh
1bb807bb45 Add default -Werror to libbufferhub
bug: 66996870
Test: normal build
Change-Id: I1a5d17a2752972f91fd7196128c10dddedca177d
2017-12-12 14:33:18 -08:00
Colin Cross
e87040b2eb Allow Soong to generate its own build documentation
Add a rule in soong that re-executes soong_build in order to
generate build documentation.  This allows Soong to customize
the documentation.

Bug: 70516282
Test: m soong_docs
Change-Id: If143cfacd6ac20274cd7bb8d8fab0c07025a5553
2017-12-12 11:12:32 -08:00
Colin Cross
59014396ba Make SingletonContext.Rule take a blueprint.RuleParams
Make the currently-unused SingletonContext.Rule match
ModuleContext.Rule and take a blueprint.RuleParams instead
of an android.RuleParams, and delete android.RuleParams.

Test: m checkbuild
Change-Id: I018685a3dc13f60825b5ba383ef365df2bc98dfc
2017-12-12 11:12:32 -08:00
Chih-hung Hsieh
6f822b8b93 Merge "Add default -Werror to sdk/emulator/mksdcard." 2017-12-12 07:36:36 +00:00
Treehugger Robot
ae6bd3d758 Merge changes If54d9c69,Ibc253514
* changes:
  Fix PathForPhony
  Allow java manifest property to reference filegroups
2017-12-12 04:05:22 +00:00
Chih-Hung Hsieh
a227ea38f0 Add default -Werror to sdk/emulator/mksdcard.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I6499be53a2539143ad6785c1513fe4bd5d3a9910
2017-12-12 01:45:01 +00:00
Chih-hung Hsieh
a3818107e8 Merge "Add default -Werror to frameworks/ml/nn." 2017-12-12 01:43:37 +00:00
Treehugger Robot
a4823680a1 Merge "Increase per-process file limits for multiproduct_kati" 2017-12-12 00:45:28 +00:00
Colin Cross
74e3fe4cd4 Fix PathForPhony
PathForPhony was prefixing out/soong to all of the phony targets.

Test: m checkbuild
Change-Id: If54d9c692b79751a09eef76c734dd2a1f7db325b
2017-12-11 16:30:14 -08:00
Colin Cross
366938f268 Allow java manifest property to reference filegroups
Also factor out ExtractSourceDep and ExpandSource.

Test: m checkbuild
Change-Id: Ibc253514bc3109d84ec388a05c66b8108af5d6ab
2017-12-11 16:30:14 -08:00
Alan Leung
9f319118e1 Add USE_D8_DESUGAR option in build/soong
Add an option to use D8's desugar instead of the standalone version.

USE_D8_DESUGAR=true m would trigger DCHECK in dex2oat unless
https://android-review.googlesource.com/c/platform/art/+/562595 is
patched in as well.

Bug: 69329508
Test: m && USE_D8_DESUGAR=false m

Change-Id: I864d88e257a2ba0b7f19aa5cced537301950e963
2017-12-11 16:05:51 -08:00
Treehugger Robot
d4c03092cd Merge changes I13910647,Ie061e90c,I1c1cb098
* changes:
  Escape genrule commands
  Allow java binary wrapper files to reference filegroups
  Allow globs in tool_files
2017-12-11 23:55:57 +00:00
Jeff Gaston
31603067b0 Escape genrule commands
Bug: 70387174
Test: Put this text into an Android.bp:

    genrule {
        name: "test_genrule",
        tool_files: ["foo"],
        out: ["foo.c"],
        cmd: "for i in a b c; do echo $$i; done > $(out)",
    }

    cc_library {
        name: "libtest_genrule",
        srcs: [":test_genrule"],
    }

  and then run `m -j libtest_genrule`. Although the library
  shouldn't compile, check that it produces a foo.c that has
  "a\nb\n\c\n" and not "\n\n\n".

Change-Id: I139106479439c9b3a95f1a2ecc23e73570d7bd59
2017-12-11 23:55:03 +00:00
Colin Cross
c331599a88 Allow java binary wrapper files to reference filegroups
Also allow commands with no tools for the case when standard
shell utilities are used to munge an input file.

Test: m checkbuild
Change-Id: Ie061e90cafe1a0a0db004a89e9a17fb48709cb03
2017-12-11 23:54:35 +00:00
Chih-Hung Hsieh
8fd29d3bb8 Add default -Werror to frameworks/ml/nn.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I6c7fb32b0abaf9b1dc03292daf7c584b1648eeeb
2017-12-11 23:24:46 +00:00
Chih-Hung Hsieh
75f2e70dff Add default -Werror to system/vold/tests.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I730943ace4aa329459d6280d1c2be601f7383343
2017-12-11 23:21:57 +00:00
Chih-hung Hsieh
44c235d4d7 Merge "Add default -Werror to cts." 2017-12-11 23:20:47 +00:00
Tobias Thierer
8b6faf6c8e Merge "Revert "Build with OpenJDK 9 -target 1.8 by default except for errorprone."" 2017-12-11 22:57:51 +00:00
Dan Willemsen
22de216799 Increase per-process file limits for multiproduct_kati
On large branches (250+ configurations), the open file count can go
over the default 1024 soft limit on Ubuntu. Many systems have increased
that default, but for the ones that haven't, at least opt into the
hard limit until this can be refactored to use fewer open files.

Bug: 70370883
Test: prlimit -n256:4096 build/soong/build_test.bash -only-config
Test: ulimit -Sn 256; build/soong/build_test.bash -only-config (darwin)
Change-Id: I7a952ffc89a0149ab65b04db1523d348daa6ab3e
2017-12-11 22:53:16 +00:00
Jeff Gaston
592faab77d Merge "Clearer error if no Android.bp is found" 2017-12-11 21:10:38 +00:00
Tobias Thierer
e05f3a5f3f Revert "Build with OpenJDK 9 -target 1.8 by default except for errorprone."
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 CL topic:
https://r.android.com/#/q/topic:bug69449021_attempt2

Bug: 69449021
Test: Treehugger
Change-Id: I9ead8d569226bd487baee3c6d5be9ec7033eb56a
2017-12-11 14:54:10 +00:00
Tobias Thierer
13f23a2753 Build with OpenJDK 9 -target 1.8 by default except for errorprone.
(This is cherry-picked from the first attempt to submit this CL
topic, which was reverted after 3 hours because of bug 70286093;
robolectric 3.{1.1,4.2} now stick with OpenJDK 8 to avoid that bug).

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: Running robolectric tests succeeds on internal-master
      after cherry-picking this CL topic, using the command
      line from http://b/70286093#comment1
(cherry picked from commit 0ae8b548af)

Change-Id: Ide6a7e55126d919a44f89ef8e0bd14fb12ff470e
2017-12-11 14:53:52 +00:00
Colin Cross
ac87c992be Allow globs in tool_files
tool_files can be used to add dependencies on files used by tools,
so let it support globs.

Test: m checkbuild
Change-Id: I1c1cb098190e1bb1c81292f6eb0c4ed0e240c1e1
2017-12-08 18:23:57 -08:00
Jeff Gaston
02ae4decb7 Clearer error if no Android.bp is found
Bug: 70036990
Test: touch .out-dir && m -j nothing 2>&1 | grep "must not exist"
Change-Id: Idefa70dafa53bca17134e99185d2c524671bae25
2017-12-08 14:39:37 -08:00
Tobias Thierer
06ae582000 Export makevars ANDROID_JAVA{8,9}_HOME.
These variables are published by config.go for use inside
.mk scripts. They are suitable for rules that need to be
pinned to a particular java/javac version because they do
not (yet) support the other.

Bug: 70286093
Test: Treehugger
Change-Id: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
Merged-In: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
2017-12-08 18:35:43 +00:00
Colin Cross
e304cc4575 Merge "Split logtags implementations for cc and java" 2017-12-08 16:14:06 +00:00
Colin Cross
5beccee92c Split logtags implementations for cc and java
Logtags files in cc and java are treated fundamentally differently.
In cc, they are not used for compiling at all, but need to be passed
to Make to be combined into the global logtags list, and logtag files
are listed in a logtags property.  In java they are listed in srcs
and produce generated code that is compiled in, and so shouldn't
also need to be listed in a logtags property.

Move the logtags property to cc and export it to Make from there,
and have java extract logtags files from srcs to be exported to
Make.

Test: m checkbuild
Change-Id: I31d49289efe72db60d2f33566df771b4a3ebc8a0
2017-12-07 15:32:30 -08:00
Jeff Gaston
29e959dd7f Search for files named Blueprints only under build/blueprint
to enable other subprojects to use their own instance of
Blueprint in other directories.

Files named Android.bp are still autodetected throughout the
tree like previously.

Bug: 64363847
Test: mkdir -p subdir \
      && echo "syntax error" > Blueprints \
      && m -j nothing

Test: build/soong/scripts/diff_build_graphs.sh \
      --products=aosp_arm \
      'build/soong:work^' 'build/soong:work'

Change-Id: I8199f12b68dc1699bf44682b86169def37b53a5e
2017-12-07 13:00:51 -08:00
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