Commit graph

389 commits

Author SHA1 Message Date
Steven Moreland
631efe9318 Merge "Add split PRODUCT_FULL_TREBLE variables to Soong." am: 4c016b996e am: 3b81e0d9f6
am: 3ca2f36a19

Change-Id: I72f547172e6cac75d46b2b2f90e1ce417b7ad9c7
2017-12-15 17:57:18 +00:00
Treehugger Robot
4c016b996e Merge "Add split PRODUCT_FULL_TREBLE variables to Soong." 2017-12-15 17:41:27 +00:00
Colin Cross
2be8e07ad3 Export app certificates to Make for apkcerts list am: e1731a5803 am: 461aba31c6
am: 0c77c7c46d

Change-Id: I5b31a7359839e10c66f3dbdc4c2c1aeb80916012
2017-12-14 22:34:39 +00:00
Colin Cross
e1731a5803 Export app certificates to Make for apkcerts list
Bug: 70669383
Test: m apkcerts-list contains framework-res.apk
Change-Id: I38af458e4262371c9c8368b5eebcff063a9bc359
2017-12-14 12:28:41 -08:00
Steven Moreland
c2b9f060d9 Add split PRODUCT_FULL_TREBLE variables to Soong.
As a follow-up to this, Treble will be removed from Soong.

Bug: 62019611
Test: manual
Change-Id: I840e0d6130b834299d0cf3603443cc4c3f7f8e6d
2017-12-13 22:21:46 +00:00
Justin Yun
b41da7cd8e Install current VNDK libs to the versioned directories. am: 8fe1212261 am: df323367e7
am: 0de3759433

Change-Id: I70feaaa31fe8b66714cedeede3b6692ed283301f
2017-12-13 03:00:05 +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
Colin Cross
796802e2ad Allow Soong to generate its own build documentation am: e87040b2eb am: 734adeb16f
am: 1846e89645

Change-Id: I80c1435d51c89b72619eeb4a3e66c22363039fc3
2017-12-13 00:10:53 +00:00
Colin Cross
242f06d7ae Make SingletonContext.Rule take a blueprint.RuleParams am: 59014396ba am: dfdd908ed0
am: a8c92e9298

Change-Id: I9c7d8a085d0b116fb984fe8359176aa4ad354740
2017-12-13 00:10:47 +00: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
Colin Cross
0ad2cf46bd Merge changes If54d9c69,Ibc253514 am: ae6bd3d758 am: 9b368d90f3
am: 6e975dce0f

Change-Id: I86099d50cad3f49dd68774d65cd72d6f97312e80
2017-12-12 04:20:34 +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
Tobias Thierer
18d1ee4b1a Merge "Revert "Build with OpenJDK 9 -target 1.8 by default except for errorprone."" am: 8b6faf6c8e am: 2491fea5fb
am: 1a72258952

Change-Id: Ifea38fbce4431dbf33be2eda469bba0b7dcedd2b
2017-12-11 23:18:04 +00:00
Tobias Thierer
e29e109f92 Build with OpenJDK 9 -target 1.8 by default except for errorprone. am: 13f23a2753 am: 86277b4017
am: a8e1fec173

Change-Id: I87cb5fe8faa6f223b1d075f2e62fe13b5555a5eb
2017-12-11 19:29:32 +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
114db0a93f Merge "Split logtags implementations for cc and java" am: e304cc4575 am: b18d19f9ba
am: 40e8b3dc40

Change-Id: Iadaeec9973069815bb116be3b7f6e6180a8a9025
2017-12-08 16:43:42 +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
Tobias Thierer
8bd31ca2a2 Merge "Revert "Default to building with OpenJDK 9 -target 1.8."" am: c7efdd9b36 am: 38f7173524
am: c249101b08

Change-Id: If49432cc429fd03a218f8131c3001c0ad839ca12
2017-12-06 14:18: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
db10b13533 Merge "Build with OpenJDK 9 -target 1.8 by default except for errorprone." am: cf8d83de82 am: 51512a1848
am: bbc4897b9e

Change-Id: Ib9b80d89fc488ddf7c3d380aa944b1bcc070fe7c
2017-12-06 11:22:03 +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
a489390d5e Split java_binary modules into common and binary variants am: 6b4a32d771 am: 21fafc6298
am: 957ba7455c

Change-Id: I00f8b4ce743ea60a078395293cb3fff0e30fb8ad
2017-12-06 04:32:34 +00:00
Colin Cross
6d790918de Make (Source|Output)Path.Join("foo").Rel() return "foo" am: 0db5568612 am: a244a33418
am: 510005cb28

Change-Id: I5f15d7e5948935d0d09abc2ae2b5a82788c9aa09
2017-12-06 04:32:30 +00:00
Colin Cross
9dea654334 Make TestModule.Output print a list of all outputs on error am: 9cf27db425 am: 799ed60b06
am: b1e8caba31

Change-Id: I025adfc4aabe955e3fbfca51c4198e262549b960
2017-12-06 04:18:28 +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
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
Jeff Gaston
251e2cf90b Merge changes from topic "soong-namespaces" am: 73c2099534 am: 40573a7456
am: 0b97da65fe

Change-Id: I43e1f9844414ce329e6dd87c25267fe4f12387a4
2017-12-05 04:01:59 +00:00
Jeff Gaston
c2daa54bcc require namespaces to be declared only in files named Android.bp am: 5c3886de5a am: 3f51258096
am: 7167a0811b

Change-Id: Ic219976a53aeaafcb385590db37d00533cdab7d1
2017-12-05 04:01:55 +00:00
Jeff Gaston
729ee1dd4f Revert "Revert "Soong support for namespaces"" am: 088e29ed38 am: 994f9e7a92
am: e2a73fe8f5

Change-Id: Ib4f244a1e2d91b5acbf2dcc251a041ad7798e64d
2017-12-05 04:01:47 +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
Justin Yun
3978135eea Install VNDK snapshot libraries for system build am: 7154928c93 am: 702a40d5cd
am: bc90006024

Change-Id: I4bbfc018d62fb67bdad7828fa8a2a2298d4b2369
2017-12-05 01:59:44 +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
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
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
Colin Cross
1266743566 Fix builds outside of make am: e15ddaf4ae am: c9a8134399
am: eae19f6269

Change-Id: I2225b6b414e5f125389583bb57f4cea5c2414070
2017-12-04 21:21:18 +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
dfff3da415 Use default app certificate from Make am: 61ae0b7eed am: 9d58bf0610
am: 04585ff7d8

Change-Id: I1918429630415d83b72ab04f630fccc9fba766d7
2017-12-02 04:54:11 +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
Colin Cross
424d07d5bb Add enforced RRO support to Soong am: 890ff551f7 am: 4713d17c35
am: 946db4ba81

Change-Id: I7c5a3120f8e9f7c5f8bef26ecf570924fda6df26
2017-12-01 22:20:49 +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
Sundong Ahn
0926fae350 Add system_$(VER)
The system_$(VER) is added for vendor, similar to sdk.

Bug: 67724799
Test: build
Merged-In: I2545c92707591ca278066870c74e9f49e9825855
Change-Id: I2545c92707591ca278066870c74e9f49e9825855
(cherry picked from commit b8baff1fa3)
2017-12-01 00:41:59 +00:00
Colin Cross
946c84e98b Merge "Allow building framework.jar and framework-res.apk" am: 85c87cef01 am: 2fc6f692d1
am: 5f3053a307

Change-Id: Id93733384a0c3636098d457bc22a474da67561d1
2017-11-30 20:46:28 +00:00
TreeHugger Robot
90370098f5 Merge "Add system_$(VER)" 2017-11-30 06:52:39 +00:00
Colin Cross
5ab4e6d817 Allow building framework.jar and framework-res.apk
Update app support enough to build framework-res.apk, link
framework.jar against its generated files, and export it to
make.

Bug: 69917341
Test: m checkbuild tests docs
Change-Id: I7db29cd1f5fabb22e844483ecc7c38abfedbbe0a
2017-11-29 20:47:42 -08:00