Commit graph

15197 commits

Author SHA1 Message Date
Colin Cross
39772fedde Remove redundant renderscript_target_api computation
renderscript_target_api is set by java_renderscript.mk, it doesn't
need to be computed again in static_java_library.mk and
package_internal.mk.

Bug: 73885582
Test: no change to ninja file
Change-Id: Ib6e00be425c385f4911def19ed5042a740f2c79b
Merged-In: Ib6e00be425c385f4911def19ed5042a740f2c79b
(cherry picked from commit 55cce23360)
2018-03-20 15:26:27 -07:00
Colin Cross
1e047d39a5 Move java renderscript support to java_renderscript.mk
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt.  Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
2018-03-20 15:26:27 -07:00
Colin Cross
dc1e028994 Use srcjar and resource zip as output of renderscript rules
Replace RenderScript.stamp with a srcjar, with a resource zip as
an implicit output.  This makes the renderscript rules self contained,
which will make it easier to move them before aapt.

Bug: 73885582
Test: m checkbuild
Change-Id: I12d33e52019aebac6ea33271939228e4690a4173
Merged-In: I12d33e52019aebac6ea33271939228e4690a4173
(cherry picked from commit e00e2fae52)
2018-03-20 15:25:51 -07:00
Nan Zhang
0aa96a05fb Add dist-for-goals for droiddoc docs.zip
Old droiddoc will install the *-docs.zip & API files to the dist.

And also remove INTERNAL_PLATFORM_*API_FILE variables from config.mk and
get rid of the dependencies on api-stubs, system-api-stubs, test-api-stubs
timestamp.

Test: m -j api-stubs-docs
Bug: b/70351683
Change-Id: I08923bb5f62d2f55961d9a2865723d7b3fae7206
Merged-In: I08923bb5f62d2f55961d9a2865723d7b3fae7206
2018-03-20 11:42:23 -07:00
Julien Desprez
ee9ea1d601 Merge "Add loganalysis to cts" 2018-03-20 02:44:20 +00:00
Treehugger Robot
ad29fe419e Merge "Use bsdiff to generate recovery-from-boot.p for system-root-image." 2018-03-20 00:00:34 +00:00
jdesprez
4619031efe Add loganalysis to cts
Tradefed depends on Loganalysis so it should also be part
of cts. Luckily there was no overlap (cts never called a
part of TF that use loganalysis) so it never failed
with classNotFound before.

Test: build cts
Bug: 75979908
Change-Id: I2542ecd077149f7165aff120d67054943df20b54
2018-03-19 16:47:22 -07:00
Tao Bao
6d5d623987 Use bsdiff to generate recovery-from-boot.p for system-root-image.
This CL handles a path that uses system-root-image on non-A/B device.
For this path, we can't generate recovery-from-boot patch with imgdiff,
because boot/recovery images contain different number of entries (only
recovery iamge has ramdisk image now).

Using BOARD_USES_FULL_RECOVERY_IMAGE can work around the issue, at the
cost of extra size. Compared to carrying full recovery image, this CL
saves the cost of the kernel size, by putting a patch that's roughly the
size of the recovery ramdisk.

The applypatch executable already detects and handles a bsdiff patch
automatically. No change required to that end.

Note that it won't further reduce the patch size by handling that
ramdisk entry specially, because (a) that's the only difference between
the two images; and (b) there's no corresponding data in boot image to
be diff'd against.

Bug: 72731506
Test: `m dist` with aosp_angler-userdebug. Check the device can install
      recovery image successfully (after intentionally corrupting the
      recovery image).
Test: Build aosp_angler-userdebug with BOARD_BUILD_SYSTEM_ROOT_IMAGE set.
      Verify the generated patch files.
Test: Run validate_target_files.py with the target_files.zips.
Change-Id: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17
2018-03-19 14:13:02 -07:00
Colin Cross
238bb91678 Merge "Provide testcases directory for host cross out (windows) modules" 2018-03-19 20:40:50 +00:00
Colin Cross
c9907cc8f6 Merge "Replace extract_srcjars.sh with zipsync" 2018-03-19 20:33:08 +00:00
Søren Gjesse
d04f28db7b Merge "Enable R8 by default (second attempt for Q)" 2018-03-19 07:27:20 +00:00
Colin Cross
e887ccbf12 Provide testcases directory for host cross out (windows) modules
If HOST_CROSS_OUT_TESTCASES is not defined, then a module that
builds for windows and has a test config will attempt to install
the config file to /<module>/<module>.config.

Fixes:
[ 54% 99/183] Copy: /simpleperf_unit_test/x86/simpleperf_unit_test.exeninja: error: mkdir(/simpleperf_unit_test): Permission denied

Test: m simpleperf_unit_test
Change-Id: I07dcecbce9c710b29fec5fbdedc462be3245b578
2018-03-17 05:14:13 +00:00
Martijn Coenen
c3162eeff0 Products launching with API 28 need 64-bit binder interface.
This time around we're really deprecating the 32-bit
binder interface (v7), even for 32-bit devices.

Upgrading devices can keep using it.

Bug: 69775513
Test: manual makefile prodding
Change-Id: I3850418ca267e72593f5f12b940e5382b29b024a
Merged-In: I3850418ca267e72593f5f12b940e5382b29b024a
2018-03-16 09:43:39 +01:00
Colin Cross
3f99cd5933 Replace extract_srcjars.sh with zipsync
Use zipsync instead of extract_srcjars.sh.

Also fixes an issue where unzipping a resource zip would
ignore anything that wasn't a *.java file.

Bug: 73885582
Test: m checkbuild
Change-Id: I1c25f65afa196614879071c8655866febebac185
2018-03-15 16:40:05 -07:00
Colin Cross
1f4f67201d Merge "Update turbine command line flags" 2018-03-15 22:39:28 +00:00
Colin Cross
0c0adb993c Allow compiles with only srcjars
Some javac and turbine compiles have no source files but sources
from srcjars.  Continue with compilation if the java source list
is empty but the srcjar source list is not.

Bug: 73885582
Test: m checkbuild
Change-Id: Ica412de2dd1b1bfc12c01c3eafca884220d42771
2018-03-15 13:07:33 -07:00
Colin Cross
6b27285619 Update turbine command line flags
The latest version of turbine requires a -- after the javac
options, and uses multiple --bootclasspath arguments instead
of a javac-style colon separated list.

Test: m javac-check
Bug: 74339924
Change-Id: I3f694ac375eab61954d4fe63c1166a18314bf75f
2018-03-15 06:04:53 +00:00
Colin Cross
34af6a41ff Merge changes I97ea3ff3,Ib4351a5b,I74b61809,If2653f84,I2932f9e9, ...
* changes:
  Allow aapt2 rules to take zipped resource files
  Add LOCAL_SRCJARS support
  Remove unused .fs file suppport
  Remove unused file lists
  Remove sharding support from make
  Move aapt flags from java_common.mk to aapt_flags.mk
2018-03-14 23:29:49 +00:00
Colin Cross
bc0c494d3a Allow aapt2 rules to take zipped resource files
Allow aapt2 rules to take zipped resource files similar to the
way the javac rules take srcjars.  For now, unzip the files using
extract_srcjars.sh, and then use aapt2 compile --dir.  Eventually
it could be done with aapt2 compile --zip.

Bug: 73885582
Bug: 74574557
Test: m checkbuild
Change-Id: I97ea3ff305e7a9ef2a908b4cf0bca903af62c6b1
2018-03-14 14:13:18 -07:00
Søren Gjesse
f71d68de18 Enable R8 by default (second attempt for Q)
Fixed bugs which was discovered in the last attempt.

Bug: 74508478

Test: m -j PRODUCT-taimen-userdebug
Test: m -j PRODUCT-elfin-userdebug
Test: Check that some .vdex files built have R8 generated code

(cherry picked from commit a3b796d998)

Change-Id: Ibe08137cd6db94b1fc487267e169d3f5ee598846
Merged-In: I2a8e0e5cad1d698ae73ba152e34a08a496112d7d
2018-03-14 22:09:10 +01:00
Treehugger Robot
d3547d9d5b Merge "Enable apps to build with resource namespaces" 2018-03-14 21:05:55 +00:00
Colin Cross
11e2d55c0f Add LOCAL_SRCJARS support
Allow java modules to take jars containing .java files as an input.
For turbine, pass them directly to turbine.  For javac, extract them
to a directory and pass a list of the files to javac.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib4351a5b4b165a55e5fb02ee2680466db368983a
2018-03-14 12:05:04 -07:00
Colin Cross
93d6550c53 Remove unused .fs file suppport
.fs files are obsolete.

Bug: 73885582
Test: m checkbuild
Change-Id: I74b618099333fe565c7b235994be64e6466d2da6
2018-03-14 12:05:01 -07:00
Colin Cross
c3e7074df1 Remove unused file lists
RS_FILES and AIDL_FILES were used for cleaning up the intermediate
src dir, but are no longer used after
If7529979de6fa62a651933a3a974f47b033851d6 and
I01feff7cc399ac5b88b83333a1ac86928d0a81e6.

Bug: 73885582
Test: m checkbuild
Change-Id: If2653f846b568fd2587c8e055ef820e17760f133
2018-03-14 12:04:58 -07:00
Colin Cross
5ef6e79c21 Remove sharding support from make
Sharding is not used in make any more, the large java modules
(libcore and framework) have moved to Soong.  Keeping sharding
support complicates java compiling, so remove it.

Bug: 73885582
Test: m checkbuild
Change-Id: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
2018-03-14 12:04:55 -07:00
Colin Cross
b6013af085 Move aapt flags from java_common.mk to aapt_flags.mk
The aapt flags were being set in java_common.mk, which is used by
various entry points.  host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do.  Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.

Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
2018-03-14 12:04:35 -07:00
Adam Lesinski
960de8efcd Enable apps to build with resource namespaces
Setting LOCAL_AAPT_NAMESPACES := true enables
namespaces for an app and requires any library resources
to be fully qualified by their package.

Test: manual
Bug: 73885582
Change-Id: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
Merged-In: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
2018-03-14 12:04:01 -07:00
Colin Cross
5c66c2864a Allow locally disabling R8
Bug: 74746744
Test: m checkbuild
Change-Id: I5741f15821cf8de5df494ed8ad31d32a44657514
2018-03-14 17:00:23 +00:00
jdesprez
b8f85204a6 Update the base autogenerated config template for instru
For APCT auto-generated configuration, the template will
include the test-suite-tag that will allow it to be
picked up automatically.

Test: none
Bug: 74440293
Change-Id: Ia82e8287f212f4daec97523394517bfbbe7a86d3
2018-03-13 13:43:42 -07:00
Dan Willemsen
a0c1cc97bd Merge "Remove obsolete BRILLO variable" 2018-03-12 21:26:03 +00:00
Dan Willemsen
19bd9b99ce Remove obsolete BRILLO variable
Test: none
Change-Id: Ia4474927709ccfa1ff76f5dda1d8aa13ef9d1004
2018-03-10 15:23:12 -08:00
Dan Willemsen
6b3a8380cc Fix xz with SANITIZE_HOST
There isn't an Address Sanitizer prebuilt of xz, so always use the same
xz prebuilt.

Bug: 36130900
Test: SANITIZE_HOST=address m nothing; check ninja file
Test: m libc
Change-Id: Iba3599d4289ad5afb573dbec5ac8fc463668b1c6
2018-03-09 22:38:37 -08:00
Treehugger Robot
8e287901c3 Merge "Use xz prebuilt" 2018-03-10 03:00:29 +00:00
Dan Willemsen
893859573d Use xz prebuilt
Instead of whichever xz happens to be on the PATH.

Bug: 36130900
Test: m
Change-Id: Ib37d8db4e935ef8f69f3d43b5065c22d34028cf3
2018-03-09 12:56:01 -08:00
Nan Zhang
ccdecc7e02 Fix droiddoc variable name in clear_vars.mk
Test: m -j
Bug: b/70351683
Change-Id: I8cb4429a7e6bebde541a09f0328dddb937c0aced
2018-03-09 12:39:34 -08:00
Treehugger Robot
d29f3e7026 Merge "Rename stubsjar to stubsSrcjar for droiddoc" 2018-03-09 09:42:29 +00:00
Anton Hansson
5a49a36a55 Merge "Enforce specifying sdk/private for apps. DO NOT MERGE" 2018-03-09 09:18:06 +00:00
Treehugger Robot
1cfafdd9fc Merge "Support a pre-extracted PDK zip" 2018-03-09 04:26:48 +00:00
Nan Zhang
89f12b00f0 Rename stubsjar to stubsSrcjar for droiddoc
Test: m -j core-docs
Bug: b/70351683
Change-Id: I90e4df3ba002c7488f3a80066bf3723b6f299b04
2018-03-08 17:29:16 -08:00
Treehugger Robot
0b4b321565 Merge "Remove unnecessary link-type check" 2018-03-09 00:21:21 +00:00
Dan Willemsen
0663f685c2 Support a pre-extracted PDK zip
Pre-extracting the zip files are more sustainable for git, so that
objects can be shared if unchanged, rather than the 900MB zip file
changing on every build.

This also has the advantage that we could put an Android.bp file inside
the PDK, and Soong would just pick it up.

Bug: 68767391
Test: Build mini_arm64 PDK with platform.zip
Test: Build mini_arm64 PDK with extracted zip file
Change-Id: I16db030a731aea55b69c1d6e2260dbd70b167544
2018-03-08 13:50:21 -08:00
Ivan Lozano
b5399007ca Merge "Add minimal-runtime support for integer overflows." 2018-03-08 20:12:10 +00:00
Anton Hansson
62c7de3792 Enforce specifying sdk/private for apps. DO NOT MERGE
All apps in master comply with this now, but new offenders
are being added daily. This will ensure compliance going
forward.

Test: build/soong/build_test.bash
Bug: 73535841

Change-Id: If28049750a9787bf455f72402e624dbddf842253
2018-03-08 13:19:36 +00:00
Nicolas Geoffray
2bff9a7c79 Merge "Revert "Remove art targets from PARSE_TIME_MAKE_GOALS"" 2018-03-08 08:57:44 +00:00
Jiyong Park
98a4f52c28 Remove unnecessary link-type check
Modules from Soong do not have dependency specified (via
LOCAL_JAVA_LIBRARIES). So, link-type check 'from' them doesn't make
sense. Resetting my_warn_types and my_allowed_types

Bug: 69899800
Test: m -j checkbuild on aosp_walleye, aosp_sailfish
Test: build/soong/build_test.bash --dist
Change-Id: I2a409e64f388bd8cb9336be589bf6af33e48a6f4
2018-03-08 15:23:08 +09:00
Treehugger Robot
f74c027301 Merge "build/make: Add default suite for all native tests/benchmarks" 2018-03-08 01:38:04 +00:00
Mathieu Chartier
afc270b066 Merge "For user and userdebug generate error if DEXPREOPT is not enabled" 2018-03-07 22:34:14 +00:00
Mathieu Chartier
2594230d83 For user and userdebug generate error if DEXPREOPT is not enabled
This prevents cases where system_server is running in interpreter
only mode.

Removed unused flag in product.mk

(cherry-picked from commit 27f4287406)

Bug: 74209329
Test: WITH_DEXPREOPT=false make
Merged-In: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
Change-Id: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
2018-03-07 22:21:43 +00:00
Simran Basi
d63a8153da build/make: Add default suite for all native tests/benchmarks
Not all native tests have the "tests" tag so adjust the logic to be:
NATIVE_TESTS||NATIVE_BENCHMARKS||(APPS&&tags==tests)

Bug: 74339384
Test: Rebuilt module-info.json, verified native tests now have
      their suite set to null-suite and have auto_test_config=True
      Double checked a frameworks App unittest as well.

Change-Id: Idea00adcebfc1a78b0c6d8ade40feddb1e90ed83
2018-03-07 12:36:55 -08:00
Colin Cross
8dad6c62d4 Remove missed PRODUCT_AAPT_FLAGS
PRODUCT_AAPT_FLAGS was removed by Iacc914114616b5bd19d9a1011802f4f9bca9bc19,
remove one more that it missed.

Test: m checkbuild
Change-Id: I31ea4954f5af5af37f13210925ed5d622625d71b
2018-03-07 09:48:33 -08:00
Colin Cross
7874138a8a Allow soong java libraries to include exported resources and proguard flags
Test: m checkbuild
Change-Id: Ia02f816084d0eb1c0e0f20e1ecd57aaf3778874c
2018-03-07 09:48:33 -08:00
Colin Cross
f6799e859a Silence more duplicate path warnings
Silence warnings when merging header jars that were missed by
Ifb67dbf7734b5f53941d110f578c4fe642e36005.

Bug: 69316739
Test: m checkbuild
Change-Id: I5cfea62e46d99f9b315a589d8915bf62307220aa
2018-03-07 09:47:41 -08:00
Colin Cross
6e136922f3 Remove framework_res_package_export_deps
framework_res_package_export is now always either the prebuilt
android.jar from an SDK or a package-export.apk generated by
Soong, so the dependency on R.stamp is never useful.  Remove
all assignments to framework_res_package_export_deps, and replace
usages with frameworks_res_package_export.

Test: m checkbuild
Change-Id: If484e9eb08061cb0ed0697755f13db71d741aaab
2018-03-07 09:47:41 -08:00
Roland Levillain
209b96e152 Revert "Remove art targets from PARSE_TIME_MAKE_GOALS"
This reverts commit 86a596c711.

Reverting as that commit breaks ART tests' results (see
b/73804944).

Test: m test-art-host
Bug: 73804944
Bug: 26275726
Change-Id: I06af4b170d845d3e55e044c28ec22d4b3ca3dede
2018-03-07 16:25:55 +00:00
Treehugger Robot
1ac4e3c424 Merge "Conditionally generate META/boot_filesystem_config.txt." 2018-03-06 23:32:40 +00:00
Treehugger Robot
0d6a25c73f Merge "Clarify error message for bootclasspath whitelist." 2018-03-06 18:24:11 +00:00
Ivan Lozano
911cb99bc1 Add minimal-runtime support for integer overflows.
Adds Make support for -fsanitze-minimal-runtime when using
the integer overflow sanitizers. This makes the crashes due to these
sanitizers less mysterious. This also cleans up the handling of the
integer_overflow flag.

Bug: 64091660
Test: Compiled and checked the generated compiler commands
Test: Checked program that overflows for the abort reason
Test: Checked integer_overflow flag still emits overflow checks

Change-Id: I11012ed0cbbf51935f549a08bd17109b5ce6f330
2018-03-06 09:20:21 -08:00
Anton Hansson
53876001bf Merge "Add more control to the java sdk enforcement." 2018-03-06 11:19:38 +00:00
Nan Zhang
78c19aa9ef Fix the incorrect turbine flag.
Test: m -j java TURBINE_ENABLED=false
Change-Id: Id6ca380c97bbcd3731c815e37513b7e949cccdfb
2018-03-05 13:35:45 -08:00
Jayant Chowdhary
1fa15d7491 Merge "Collect all lsdump paths and write them to $(OUT_DIR)." 2018-03-02 17:34:33 +00:00
Tao Bao
da01b211f8 Conditionally generate META/boot_filesystem_config.txt.
if BOARD_BUILD_SYSTEM_ROOT_IMAGE != true:  # case A
  - BOOT/RAMDISK corresponds to the / under normal boot, with matching
    fs_config in META/boot_filesystem_config.txt.
  - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
    in META/recovery_filesystem_config.txt.
else:
  if BOARD_USES_RECOVERY_AS_BOOT == true:  # case B
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - BOOT/RAMDISK corresponds to the / under recovery, with fs_config
      in META/boot_filesystem_config.txt.
  else:  # case C
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
      in META/recovery_filesystem_config.txt.
    - BOOT/RAMDISK doesn't exist.

This CL fixes case C, where we shouldn't try to generate
'META/boot_filesystem_config.txt' for BOOT/RAMDISK. It wouldn't be fatal
without this fix, but would wrongly scan the current directory and
include a large fs_config output into target-files.zip.

Bug: 72731506
Test: `lunch aosp_bullhead-userdebug` and `m dist`. (case A)
Test: `lunch aosp_marlin-userdebug` and `m dist`. (case B)
Test: Define 'BOARD_BUILD_SYSTEM_ROOT_IMAGE := true' for angler. `m
      dist` and check the generated target-files.zip. (case C)
Change-Id: I5582ce8cca464d535af0718be0fd8e65791bd6c2
2018-03-01 10:53:38 -08:00
Andreas Gampe
5147749d1a Build: Add some dex2oat boot image error message
Typical failure case for boot image dex2oat is an inconsistent boot
classpath left over from incomplete build dependencies. Give advice
to run a top-level build.

Bug: 73749543
Test: m
Change-Id: I81c4ce9d02b2b360fe867b594d0a2b21c763e473
2018-03-01 08:47:44 -08:00
Andreas Gampe
fc2fefcd83 Build: Factor out ANDROID_LOG_TAGS
Factor out ANDROID_LOG_TAGS for boot image compilation. Do not use
the setting when ART_BOOT_IMAGE_EXTRA_ARGS is set.

Bug: 73749543
Test: m
Test: ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" m art-boot-image
Change-Id: Ia599381991f74f243fee966184715b0172742e78
2018-03-01 08:47:44 -08:00
Anton Hansson
f5f29aa976 Add more control to the java sdk enforcement.
I plan on turning the error on for APPS in AOSP soon, and in preparation for
that I'm introducing a finer granularity of warning/error control.

Also add an almost-empty whitelist, which will likely need to be expanded
in the future.

Bug: 73535841
Test: make
Change-Id: I2fc6700a504b7af50aa7bde727047bc56b167937
2018-03-01 14:28:47 +00:00
Treehugger Robot
690aaa95ad Merge "Change name of droiddoc target output to *-stubs.srcjar" 2018-03-01 02:06:54 +00:00
Jayant Chowdhary
67e0cc5d63 Collect all lsdump paths and write them to $(OUT_DIR).
$(OUT_DIR)/target/product/$(TARGET_DEVICE)/lsdump_paths.txt will contain all
.lsdump paths relative to $(ANDROID_BUILD_TOP). This helps faster lookup while
running scripts to generate reference dumps.

Test: m -j findlsdumps for aosp_arm64_ab.
      $OUT_DIR/lsdump_paths/generic_arm64_ab/paths.txt has paths to lsdump files
      generated for the build.

Test: m -j findlsdumps for aosp_arm_ab.
      $OUT_DIR/target/product/generic_arm_ab/lsump_paths.txt has paths to
      lsdump files generated for the build.

Change-Id: Iab1640f57bf9d0af5e88e6dda64a610fedcbe87e
2018-02-28 16:29:51 -08:00
Nan Zhang
9c98cb4815 Change name of droiddoc target output to *-stubs.srcjar
Test: m -j core-docs
Bug: b/70351683
Change-Id: I3fa696517175764b64a3b66d25ab04f02e561e51
2018-02-28 16:11:47 -08:00
Treehugger Robot
cacaf6ba6e Merge "Build: Silence patchoat" 2018-02-28 23:36:26 +00:00
Jeff Gaston
c4343864ed Merge "Clearer error if module doesn't declare any source files" 2018-02-28 16:26:36 +00:00
Andreas Gampe
10c86d588e Build: Silence patchoat
Move it to only log error-level messages, similar to dex2oat.

Test: m
Change-Id: I2884fa19aa084ac2f4cb115b0600dbe061685266
2018-02-27 20:38:00 -08:00
Treehugger Robot
08e604e741 Merge "Revert "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts""" 2018-02-28 03:07:21 +00:00
Jeff Gaston
960acf1b88 Clearer error if module doesn't declare any source files
Bug: 72552006
Test: Make a module with no source files,
      run `m -j nothing`, notice that the error tells
      which module has no sources

Change-Id: Ib169e7b3cb86d840a3acd644e42cd1f9f65e1304
2018-02-27 20:52:53 -05:00
Dan Willemsen
926ee44603 Revert "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts""
This reverts commit f78069865b.

Reason for revert: fixed mips

Bug: 73904572
Test: lunch aosp_mips-eng; m nothing
Change-Id: I4f51f91210f1d78ec97e450ac6e0509797c62bb9
2018-02-27 23:32:49 +00:00
Dan Willemsen
e752292f26 Merge "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts"" 2018-02-27 23:17:43 +00:00
Dan Willemsen
f78069865b Revert "Better error for missing LOCAL_SRC_FILES in prebuilts"
This reverts commit 8d5dc6be57.

Reason for revert: broke mips targets

Change-Id: Ib8cb21e6d480b0745911efeba1f23932ddc7c2f8
2018-02-27 23:16:12 +00:00
Dan Willemsen
3279e0c267 Merge "Better error for missing LOCAL_SRC_FILES in prebuilts" 2018-02-27 22:19:49 +00:00
Dan Willemsen
76d45d8ddf Merge "Remove some uses of export/unexport" 2018-02-27 21:22:20 +00:00
Treehugger Robot
3d4fb4e335 Merge "Make mksquashfs generate a fs_config-friendly root entry" 2018-02-27 16:24:21 +00:00
Dan Willemsen
fb394978aa Remove some uses of export/unexport
All of these are already handled by soong_ui.

Test: inspect build/soong/ui/build/config.go
Change-Id: I3aa4dcd40ea92759374f9894d525507ef970a584
2018-02-27 02:14:11 -08:00
Dan Willemsen
8d5dc6be57 Better error for missing LOCAL_SRC_FILES in prebuilts
If there's a prebuilt with LOCAL_MULTILIB := true, but only a single
LOCAL_SRC_FILES entry, we end up with a weird build error where `cp`
is trying to copy the local directory. Exit early with an error in this
case.

Bug: 73904572
Test: build-aosp_marlin.ninja is identical
Change-Id: Ie2821817c237087a96e87fb9602e430e0f86584a
2018-02-26 21:01:45 -08:00
Dan Willemsen
4c36d45a2c Use xmllint built from source
Instead of relying on whatever version of xmllint is on the host system,
build and use the version in external/libxml2.

Test: diff build_aosp-marlin.ninja, expected changes.
Test: m $(xmllint targets in build_aosp-marlin.ninja)
Test: introduce xml error, build fails
Change-Id: I39579f06db3777e3b5c8dda7c7541c25a35887b2
2018-02-27 02:34:08 +00:00
Treehugger Robot
5d7ec6bdf8 Merge "Export Make config vars to Soong to support Droiddoc" 2018-02-22 22:11:07 +00:00
Tobias Thierer
7b179ae177 Clarify error message for bootclasspath whitelist.
Before this CL, the build could fail with error messages such as:

Error: out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/classes.jar
contains class file jdk/internal/HotSpotIntrinsicCandidate.class, which is not
in the whitelist

This error message was only moderately helpful because it left a few
questions unanswered or misled ("Whitelist for what?", "Where does the
whitelist live?", "Is it a whitelist of class files or of packages?").

This CL clarifies that:
 - it's a whitelist of packages allowed on the bootclasspath,
 - where it lives (currently
   build/make/core/tasks/check_boot_jars/package_whitelist.txt)
which makes the error message more actionable.

Test: manually checked that the error message now looks okay.
Bug: 17434570

Change-Id: I2f52a5e2eb532bc4945bedf9811de5857f67a9a3
2018-02-22 14:42:28 +00:00
hansson
3c76d02668 Merge "Add support for LOCAL_PRIVATE_PLATFORM_APIS." 2018-02-22 11:33:57 +00:00
Treehugger Robot
d3bec931cd Merge "Use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER in Make." 2018-02-22 02:07:15 +00:00
Nan Zhang
0abdb5811d Use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER in Make.
<Two phase commits> Since internal master code has more places that use
BUILD_NUMBER (mostly in vendor/) than AOSP (conflict). We can't
deprecate BUILD_NUMBER directly. Therefore, we try to switch to
BUILD_NUMBER_FROM_FILE as much as possible at first. Then we will do
a one-off deprecation for BUILD_NUMBER in internal master next step.

Test: m -j
Bug: b/70351683
Change-Id: I14ffee7381933c9fde14c4bde8c0c14e45fe98bf
2018-02-21 14:12:18 -08:00
Mathieu Chartier
5c658ac3a9 Add property for generating dm files
Added product property: PRODUCT_DEX_PREOPT_GENERATE_DM_FILES.
If this property is true, APKs compiled as verify will have the dex
files left compressed and the vdex put in a dm file. The vdex file
and oat files are not copied to system partition in this case.

Bug: 70934104
Test: manual

Change-Id: Ie137e14f14642b803a506162de6db8ac65a43f46
2018-02-21 13:50:21 -08:00
Anton Hansson
7ff32d2734 Add support for LOCAL_PRIVATE_PLATFORM_APIS.
The only enforcement right now is that modules don't specify both
LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS, but a warning
can be turned on by setting the JAVA_SDK_ENFORCEMENT_WARNING variable.

Bug: 73535841
Test: make w/ and wo/ flag.
Change-Id: I3cc720bf060e2bc789e10884ff888d527b91cb50
2018-02-21 18:10:59 +00:00
Treehugger Robot
fcb10864b7 Merge "Revert "Revert "Remove art targets from PARSE_TIME_MAKE_GOALS""" 2018-02-20 19:50:50 +00:00
Treehugger Robot
6cb3e300fc Merge "have patchoat take directories instead of filenames" 2018-02-20 18:30:42 +00:00
Elliott Hughes
1d7d1eb65e Merge "Use the platform -std= for LOCAL_SDK_VERSION targets too." 2018-02-20 15:27:54 +00:00
Treehugger Robot
5fdae96b06 Merge "Revert "Revert "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES""" 2018-02-17 03:15:58 +00:00
Elliott Hughes
adf7ef8eb9 Use the platform -std= for LOCAL_SDK_VERSION targets too.
Bug: http://b/72571399
Test: builds
Change-Id: Ifd06798a7c9af9fd316201d88b724a53bcf0bcd9
2018-02-16 17:12:21 -08:00
Dan Shi
b6655e0e1a Merge "build: Default test modules to null-suite" 2018-02-17 00:39:27 +00:00
Treehugger Robot
64006ad4f3 Merge "Support core_current when exporting resources from a package" 2018-02-16 23:41:26 +00:00
Mathieu Chartier
60431c098e Merge "Add a product property for changing the default compiler filter" 2018-02-16 23:41:21 +00:00
Dan Willemsen
c51b7b0d55 Support core_current when exporting resources from a package
Bug: 73351844
Test: with https://googleplex-android-review.git.corp.google.com/c/platform/cts/+/3621794
Change-Id: I20b8adf0d7cb5d948ba752e0732bbe84d39a419a
2018-02-16 13:32:26 -08:00
Colin Cross
ce8c05196d Partially revert BUILD_DATETIME change
Change Ibe4ceb1b224c5e8f3e1a8a59cfee89217765a901 caused kati to
regenerate on every build:
$(shell cat out/build_date.txt) was changed, regenerating...
Switch back to $(shell date +%s) which is special cased in kati
to not cause a regeneration.  Everything besides DATE will still
use BUILD_DATETIME_FROM_FILE from soong_ui.

Once BUILD_NUMBER is moved to soong_ui $(DATE) is no longer
necessary and the whole thing can be removed.

Bug: 70351683
Bug: 73352417
Test: m && m doesn't regenerate
Test: m BUILD_DATETIME=1234 shows up in ro.build.version.incremental
Change-Id: I8444beb2b47a49095ef760083fc85f220821bffe
2018-02-16 09:41:24 -08:00
Treehugger Robot
dc6e822374 Merge "NO_STANDARD_LIBRARIES := true blocks ALL resource libraries" 2018-02-16 03:35:28 +00:00
Treehugger Robot
87774191b3 Merge "Record the compilation reson in oat files for prebuilts" 2018-02-16 02:28:31 +00:00