Commit graph

7875 commits

Author SHA1 Message Date
Colin Cross
9405da836c Add min_sdk_version to android_library_import modules
am: 479884c93d

Change-Id: Ie0406567bbf45fd42932c1bc57feffa1f103a400
2018-07-10 16:01:24 -07:00
Colin Cross
5d06ac18b5 pom2bp: move misplaced {{end}}
am: 461ba49a0a

Change-Id: I3b2b9f0e2649ba36afa342134a06020644aa2358
2018-07-10 16:01:10 -07:00
Colin Cross
479884c93d Add min_sdk_version to android_library_import modules
pom2bp now inserts a min_sdk_version into android_library_import
modules.

Bug: 110848854
Test: m checkbuild
Change-Id: I1396eabd8bfa02755c829ddac03022ffb7a5673e
2018-07-10 13:46:58 -07:00
Colin Cross
461ba49a0a pom2bp: move misplaced {{end}}
manifest property should only be added to aar imports and not jar
imports.

Bug: 110848854
Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.bp
Change-Id: Ifaab81582c87f0af4419f90c3928d0d5d52cec33
2018-07-10 13:46:58 -07:00
Colin Cross
7c0f8e6ec7 Don't install android_library modules
am: 73ea6a3cf1

Change-Id: I23da7d99a5811345819f4dfc03e851487013a251
2018-07-10 08:20:02 -07:00
Colin Cross
a636d4181b Merge "Fix error reporting when parsing genrule cmd"
am: 4bf3d33846

Change-Id: I3e0f7fd861ccb919e77ad8262fea37d70f1acda7
2018-07-10 08:16:41 -07:00
Colin Cross
73ea6a3cf1 Don't install android_library modules
Skip dexing and installing android_library modules, the platform
can't load them directly anyways.

Test: m checkbuild
Change-Id: I4940569f0deb0eefbe52ac1bee6a32a8b2a2c5be
2018-07-10 14:54:24 +00:00
Colin Cross
4bf3d33846 Merge "Fix error reporting when parsing genrule cmd" 2018-07-10 14:53:06 +00:00
Tobias Thierer
7215e2c1cd Merge "Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9."
am: 4599ec5b0b

Change-Id: I89c1f9fc33eddd8f41896b19cfef3bc646d8b60b
2018-07-10 04:09:55 -07:00
Tobias Thierer
4599ec5b0b Merge "Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9." 2018-07-10 11:02:59 +00:00
Mathew Inwood
06a96bbc9d Add support for -apiMapping parameter in DocLava.
am: 76c3de1cea

Change-Id: I4050d5a0ae39e8206e81238d20d04e871ca69885
2018-07-10 00:43:20 -07:00
Mathew Inwood
76c3de1cea Add support for -apiMapping parameter in DocLava.
This is used to output a mapping of class member signature to source
position, which in turn is used for automated addition of annotations in
frameworks code.

Metalava support does not exist (yet), and may not be needed, since the
addition of these annotations in a one-time thing. This change can be
reverted once this is complete.

See go/hidden-api-annotations for more context.

Test: m
Bug: 110868826
Change-Id: I90e409f6ea02b16eb9e03d92382f9bb46a8fdab5
2018-07-10 05:48:49 +00:00
Jiyong Park
0d08b06820 Merge "Fix: recovery module is disabled on 32-bit targets"
am: bdf16ec5b2

Change-Id: Ice8e0442c79ec3d673f33e8f8a229c1eccaa8b78
2018-07-09 18:45:11 -07:00
Treehugger Robot
bdf16ec5b2 Merge "Fix: recovery module is disabled on 32-bit targets" 2018-07-10 01:36:42 +00:00
Colin Cross
7540e609ea Merge "Sort and uniqify dangling rules list"
am: 93bb483ce2

Change-Id: Icb93e7cd27eca1add7105ba953b6964b89d56c8a
2018-07-09 18:16:01 -07:00
Treehugger Robot
93bb483ce2 Merge "Sort and uniqify dangling rules list" 2018-07-10 00:35:32 +00:00
Colin Cross
b6d2b5d931 Merge changes Ieaf37ba6,Ic69f1f93
am: ad234e4894

Change-Id: I53ede4011f281b0ab84f7e9a1fd36ee1f1a6a488
2018-07-09 17:18:44 -07:00
Colin Cross
f21c25f0fb Document build/soong/scripts/setup_go_workspace_for_soong.sh
am: aa070b422e

Change-Id: I05ad4f5d8160b23801817e055065a7387fd01125
2018-07-09 17:17:52 -07:00
Treehugger Robot
ad234e4894 Merge changes Ieaf37ba6,Ic69f1f93
* changes:
  pom2bp: extract minSdkVersion from manifest into Android.bp
  Add support for min_sdk_version
2018-07-10 00:16:29 +00:00
Colin Cross
aa070b422e Document build/soong/scripts/setup_go_workspace_for_soong.sh
Test: none
Change-Id: I507b7118bfc240166dced0cc26ab523ce56f68a2
2018-07-09 20:14:11 +00:00
Colin Cross
63b4e0f5c1 Sort and uniqify dangling rules list
Make the dangling rules list sorted and unique in order to avoid
very long lists when a dangling rule is referenced many times.

Also prettify the output by indenting the list and printing
"stopping" instead of a blank line for the fatal.

Test: m checkbuild
Change-Id: I8f7c27ae39b59f506b529d9995d90b0d6b9835d1
2018-07-09 20:13:52 +00:00
Colin Cross
cf53e608a7 pom2bp: extract minSdkVersion from manifest into Android.bp
When manifest merging in Soong is turned on the modules created
by pom2bp will need to have min_sdk_version specified in order
to prevent manifest_fixer from setting it to the current SDK
level.  Read the minSdkVersion attribute out of the
AndroidManifest.xml file inside each .aar file.

Bug: 110848854
Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.bp
Change-Id: Ieaf37ba6eccaf32dc5d3411566335830b1a327ff
2018-07-09 13:10:35 -07:00
Colin Cross
83bb3167f6 Add support for min_sdk_version
Add min_sdk_version properties and use it for aapt2
--min-sdk-version and --target-sdk-version flags.  Add an sdkContext
interface that any function that needs an sdk version can take in
order to get the values for the current module.

Bug: 110848854
Test: m checkbuild
Change-Id: Ic69f1f935d8b865ec77689350407df08bfac5925
2018-07-09 12:42:01 -07:00
Colin Cross
85a2e89a14 Fix error reporting when parsing genrule cmd
Report errors inside the android.Expand lambda and don't return an
error so that processing can continue and multiple errors can be
reported.  Check for errors (for example incorrect syntax of variables)
immediately after Expand returns.  Avoids a misleading error message:
specified depfile=true but did not include a reference to '${depfile}' in cmd

Bug: 111219250
Test: m checkbuild
Change-Id: Id9a16c1609f5fd9345bfa1a2191261cff72fd382
2018-07-09 19:01:36 +00:00
Tobias Thierer
b1c697d03e Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9.
The flag EXPERIMENTAL_USE_OPENJDK9 controls the *default* value
of java_version / LOCAL_JAVA_LANGUAGE_VERSION, but that default
value can be overridden by individual build targets.

One requirement for individual build targets to opt-in to
java_version 1.9 is for system modules to be generated even if
the default language version is still < 1.9. We plan to allow
this soon for libcore targets; therefore, this CL changes the
system module targets to always be defined, regardless of the
value of EXPERIMENTAL_USE_OPENJDK9.

Test: In a workspace that has http://r.android.com/646840
      "make" no longer runs into the build failure from bug 76219552.
Bug: 76219552

Change-Id: I5193347452c7967f7695929619509aea0fd46844
2018-07-09 19:47:33 +01:00
David Brazdil
bd8b75e636 Add option to compile dex for a Java library
am: 17ef5635fa

Change-Id: Idc5df275cffabb7a4180a79ace529f03e9f0389a
2018-07-09 09:34:29 -07:00
David Brazdil
17ef5635fa Add option to compile dex for a Java library
Currently Soong will only compile a Java library into dex if the
library has device support and is installable. For our use case of
inspecting the dex at build time this is not sufficient. Add a new
"compile_dex" device property which forces the creation of a dex
rule. In this case, the class jar remains the output file of the
module.

Bug: 79409988
Test: on related CL
Change-Id: Ia908a47148a03a0bdb0da4315cce6efc86c51865
2018-07-09 16:04:41 +00:00
Jiyong Park
8d52f86baf Fix: recovery module is disabled on 32-bit targets
Fixed a bug that recovery variant of a module is not created on 32-bit
targets. The bug was happening because the creation of the recovery
variant relied on DevicePrefer32BitExecutables() which returns false
for 32-bit only targets.

Now, recovery variant is checked against the primary architecture of the
device that is returned by DevicePrimaryArchType().

Test: m -j adbd.recovery on aosp_arm and aosp_arm64
adbd is built under recovery/root/system/bin and it is ELF32 and ELF64,
respectively for the targets.
Test: m -j libc.recovery on aosp_arm, aosp_arm64, aosp_sailfish
and the x86+arm target in mater. Only one libc.so is installed
under recovery/root/system/lib (or lib64).

Change-Id: I83a248d81f2c71dcfb0e9d887a75b71338f27b4d
2018-07-08 09:43:10 +09:00
Steven Moreland
b3fec2c4c2 Merge "aidl: -ninja -> --ninja"
am: 17bef8f034

Change-Id: I9745a188c77ede18c1a106239cba35abd25fea2c
2018-07-06 17:24:57 -07:00
Treehugger Robot
17bef8f034 Merge "aidl: -ninja -> --ninja" 2018-07-07 00:19:45 +00:00
Dan Willemsen
93a8721af5 Ensure bpglob is built early
am: 5af1cbe776

Change-Id: I1d7f58dd81cdcf2e9fb1c71dff044935b62b3fc1
2018-07-06 14:54:03 -07:00
Dan Willemsen
5af1cbe776 Ensure bpglob is built early
This matches the change to blueprint's blueprint_impl.bash:
https://github.com/google/blueprint/pull/213

It allows us to run bpglob during the two bootstrap phases, so we're
never running minibp or the primary builder in a later phase than
normal.

Also removes the dependency on out/soong/build.ninja from the main
phase, since it's never generated by the main phase anymore, and is
tripping the dangling dependency checks.

Bug: 73646380
Test: m nothing
Test: rm frameworks/base/core/java/android/content/pm/dex/ArtManager.java
Test: m nothing   (soong re-runs)
Change-Id: Ia3952d015ad6091ad5a841f555acda78c9390e84
2018-07-06 12:48:01 -07:00
Steven Moreland
b468bca551 aidl: -ninja -> --ninja
Bug: 110967839
Test: AIDL's runtests.sh
Change-Id: I49c0a2526b6d4083c927104a3e66017080000847
2018-07-06 11:36:32 -07:00
Mathew Inwood
f739144c43 Use correct variant for annotation processors.
am: 878c662602

Change-Id: I330b1d8e8d4de4411565ddcfaf06020e3deece86
2018-07-03 11:16:46 -07:00
Mathew Inwood
878c662602 Use correct variant for annotation processors.
Annotation processors should always have a common host variant, rather
than a device variant as the build was looking for before.

Bug: 110868826
Test: m
Change-Id: I2b7d0e7ed1af3f2f9ddb87d2bf36920737a507e9
2018-07-03 17:06:48 +01:00
Sundong Ahn
4afa0dd6fb Merge "Add api_dirs property and use module name as prefix"
am: b1f0f1aecd

Change-Id: Ibf5b2ea7f0e1742228a986ee69f33e570e1c43e2
2018-07-02 22:11:49 -07:00
Treehugger Robot
b1f0f1aecd Merge "Add api_dirs property and use module name as prefix" 2018-07-03 04:29:25 +00:00
Yi Kong
c888227e7d Merge "Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags""
am: c415116333

Change-Id: I352ec6a79d3d525c17bde9eceaf3b348b63d6a9a
2018-06-29 17:18:21 -07:00
Pirama Arumuga Nainar
8db11184e6 Merge "Remove unsupported/unused No_pie property"
am: b830e84821

Change-Id: Ief33f0e4bcf5c9323e012e4cefbc8e957eba6a34
2018-06-29 17:06:16 -07:00
Yi Kong
c415116333 Merge "Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-30 00:03:55 +00:00
Treehugger Robot
b830e84821 Merge "Remove unsupported/unused No_pie property" 2018-06-29 23:51:00 +00:00
Pirama Arumuga Nainar
19fae4e803 Remove unsupported/unused No_pie property
Bug: http://b/111000882

Doesn't seem to be supported.

Test: AOSP build, TreeHugger
Change-Id: Idaab52caa876102b062b3c21acd42c37328bd328
2018-06-29 14:57:46 -07:00
Yi Kong
e1e83e4279 Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit c729b508c3.

Reason for revert: New breakages fixed

Change-Id: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Merged-In: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
2018-06-29 20:35:35 +00:00
Roland Levillain
cda6b350c6 Merge "Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags""
am: cf96428ef4

Change-Id: I5521b4b7e10da012897018333e1209e00742f3f3
2018-06-29 02:45:53 -07:00
Roland Levillain
cf96428ef4 Merge "Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-29 09:37:42 +00:00
Yi Kong
c729b508c3 Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit e0050ebda1.

Reason for revert: Breaks build

Change-Id: I01bc218553ae6efb6140b66f035ccb129d3e5028
2018-06-29 08:19:46 +00:00
Yi Kong
71fd304741 Merge "Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags""
am: e758c83bb5

Change-Id: I16b295a98f503685db2bd4ec1a91b52d93f65ab7
2018-06-29 00:03:50 -07:00
Sundong Ahn
91676e6e42 Merge "Add stub_only_libs property"
am: 5d0d8ac858

Change-Id: I5eafedd93afcffe4fe533280524840391ee2d532
2018-06-29 00:03:32 -07:00
Yi Kong
e758c83bb5 Merge "Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-29 06:57:27 +00:00
Treehugger Robot
5d0d8ac858 Merge "Add stub_only_libs property" 2018-06-29 06:52:56 +00:00