Commit graph

960 commits

Author SHA1 Message Date
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
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
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
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
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
b9a66a6250 Merge "Remove core/clang/versions.mk and scan-build wrapper" 2018-02-15 23:56:36 +00:00
Chih-Hung Hsieh
7ed0db8d1d Remove core/clang/versions.mk and scan-build wrapper
* Use the definitions of ClangDefaultBase and ClangDefaultVersion
  in build/soong/cc/config/global.go.
* scan-build is too old;
  replaced by better clang-tidy's -clang-analyzer-* checks.
* WITH_STATIC_ANALYZER is still effective
  to invoke ccc-analyzer or c++-analyzer.

Test: make checkbuild
Change-Id: Ifd159dd28e529d5d3c9807f5e391911365da8cdb
2018-02-15 13:38:50 -08:00
Nan Zhang
975f41ed34 Remove BUILD_DATETIME from Make.
Soong_UI will handle build timestamp and export date file to Make.

Test: m -j32
Bug: b/70351683
Change-Id: Ibe4ceb1b224c5e8f3e1a8a59cfee89217765a901
2018-02-14 13:30:53 -08:00
Treehugger Robot
42c7cf0631 Merge "Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products" 2018-02-14 00:30:23 +00:00
Justin Yun
fbcc2ad22e Revert "PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION"
This reverts commit 69ae572779.

Reason for revert: Build breaks on aosp_car

Change-Id: I9c7f0eedf8ea8fb3b4e14dc2024dea376cc14093
2018-02-08 07:06:13 +00:00
Justin Yun
69ae572779 PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION
If PRODUCT_TREBLE_LINKER_NAMESPACES is not true when
BOARD_VNDK_VERSION is defined, report a build error.
To enable VNDK, linker namespace must be configured.

Bug: 72704254
Test: Try to build with one of them is missing
Change-Id: I804704e2f48fa44c8f998183508741d5cc40e4ce
2018-02-08 05:53:48 +00:00
Jaekyun Seok
c227ce7c25 Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED can be true only if early-mount of
partitions is supported. But the early-mount must be supported for full
treble products, and so BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED should be
set by default for full treble products.

Additionally this CL sets ro.vndk.version regardless of
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED.

Bug: 73078796
Test: tested with walleye
Change-Id: Icfe1b6957b55b0f9261d34d7e92db3dc5073cb58
2018-02-08 11:49:16 +09:00
Treehugger Robot
058d6c2d1e Merge changes from topic "vintf_matrix_sepolicy"
* changes:
  core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
  Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
2018-02-07 22:32:44 +00:00
Treehugger Robot
c82c0a81ec Merge "Support LOCAL_SDK_VERSION := core_current" 2018-02-06 22:37:16 +00:00
Yifan Hong
9bf93017d4 core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
This is a list of sepolicy versions that the framework supports.

Test: build framework compatibility matrix
Test: boots

Bug: 67920434
Change-Id: I82365742172b653eadb7b5315398e06cace4e000
2018-02-05 15:55:11 -08:00
Yifan Hong
8f4547cde9 Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
Test: builds
Bug: 67920434
Change-Id: I3b29fd188e755039a1fcf4814c578a2220567bf1
2018-02-05 15:55:11 -08:00
Yifan Hong
87328762e4 Move system manifest / device matrix build rules
Test: build these files
Change-Id: I6467f4b7ce421358c30ad7a4c72a77dcc2ed3f88
2018-02-01 15:36:40 -08:00
Jiyong Park
5ebca30d21 Support LOCAL_SDK_VERSION := core_current
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with LOCAL_SDK_VERSION
:= current or without LOCAL_SDK_VERSION.

Bug: 72206056
Test: m -j
Change-Id: I34a9696393aa6704fd6684a40ea5b05d3fb46b23
2018-02-01 17:14:55 +09:00
David Brazdil
b8fa6dd104 Revert "Revert "Apply hiddenapi build tool on boot jars""
This reverts commit 4a2926a44e.

Reason for revert: The original CL caused two issues:
1) Increased app startup because `profman` failed to verify boot
jars and created an empty profile for the boot image. All methods
in the framework therefore ran interpreted/JITed. New flag
"--skip-apk-verification" has been added to `profman` to fix
the issue in CL Iad614e47feada293218c11cff985a8012ca49a0f.
2) Caused a crash in Mockito CTS tests because jvmti did not
remove hiddenapi access flags from boot jars before using them.
This has been fixed with CL Ibc9a96a6b541c06844f276db009ac29514f7a3bb.

Bug: 64382372
Bug: 72550707
Test: make test-art-host
Change-Id: Ie8c58714455662f042f56b2977b01b75c5ec7d2f
2018-01-30 18:25:46 +00:00
Dan Willemsen
893bebc44b Clean up some kati warnings
Kati has a `--warn` option that adds some extra Kati-specific warnings
-- like using undefined make functions, undefined user functions, likely
bad variable lookups, etc. Some of these are bugs, others are fine doing
nothing. This fixes up all of them in the core build system.

It also complains about $(eval) usage in a recipe not being recommended.
Those aren't handled as part of this change.

Bug: 72661763
Test: build-aosp_arm.ninja is identical before and after
Change-Id: I8e00af142a7745236d3ad4efc9e91ec3ce71a511
2018-01-29 16:23:37 -08:00
Alex Light
9f1e629503 Merge "Revert "Apply hiddenapi build tool on boot jars"" 2018-01-26 18:40:55 +00:00
Alex Light
4a2926a44e Revert "Apply hiddenapi build tool on boot jars"
This reverts commit b7f00ed2af.

Bug: 72550707
Bug: 64382372
Test: atest CtsInlineMockingTestCases

Reason for revert: Causing invalid dex files to be passed to jvmti
                   agents. This causes CtsInlineMockingTestCases and
                   other tests to fail.

Change-Id: I50129e94791b9e2bef919fe398b4250ae461195b
2018-01-26 18:16:52 +00:00
David Brazdil
2e36f52738 Move locations of all hidden API lists into the build folder
ART buildbots are broken because they build against a pinned commit of
the framework and thus lack the build rules to generate hidden API lists
We aim to fix this by generating dummy API lists in the build folder.
This patch changes the location of the blacklist and dark greylist from
frameworks/base/config/ to ${TARGET_COMMON_OUT_INTERMEDIATES}/... . On
normal builds, the framework will copy its text files into the build
folder.

Test: make
Bug: 64382372
Change-Id: I9b55d2865599e367d9c4be4f834182f5c084c3bf
2018-01-26 11:35:36 +00:00
David Brazdil
b7f00ed2af Apply hiddenapi build tool on boot jars
Restrictions on usage of private APIs require encoding new information
into the dex files of the boot class path. ART now contains a new build
tool called `hiddenapi` which takes three lists of class member
signatures (blacklist, light and dark greylist), finds the class members
in their respective dex files and modifies their access flags in place.

This patch invokes the `hiddenapi` tool on all JARs in
PRODUCT_BOOT_JARS. For Java libraries built with Makefiles the tool is
invoked after the dexer directly on DEX files. For Soong-built
libraries, the build system has to unzip the JAR produced by Soong,
apply `hiddenapi` and rezip again. This is due to the fact that the
PRODUCT_BOOT_JARS variable is not available to Soong.

Bug: 64382372
Test: m
Change-Id: I6ce897d204459c8b6f46ed49e0909ff76c08a9ed
2018-01-25 09:22:08 +00:00
David Brazdil
a5cc50ab4c Merge "Add hidden API list file variables" 2018-01-25 07:55:35 +00:00
Jaekyun Seok
b7735d8105 Support /product partition
This CL adds the following build flags to support building product partition
from Android build system.
- BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
- BOARD_AVB_PRODUCT_KEY_PATH
- BOARD_AVB_PRODUCT_ALGORITHM
- BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION
- BOARD_PREBUILT_PRODUCTIMAGE
- BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCTIMAGE_PARTITION_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_USES_PRODUCTIMAGE
- LOCAL_PRODUCT_MODULE
- PRODUCT_FOOTER_ARGS
- PRODUCT_PRODUCT_BASE_FS_PATH
- PRODUCT_PRODUCT_VERITY_PARTITION
- TARGET_COPY_OUT_PRODUCT
- TARGET_OUT_PRODUCT*

And PRODUCT_PRODUCT_PROPERTIES is added to save product-specific
properties in /product/build.prop.

Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.

Change-Id: I774e6a38003734421591e51bed103802ff84f432
2018-01-25 09:33:58 +09:00
David Brazdil
ae6915ead0 Add hidden API list file variables
Add variables for the hidden API blacklist and dark and light greylist
files. These are text files with signatures of boot class path class
member with restricted access for non-platform code.

Bug: 64382372
Test: m
Change-Id: I5639c5269872ac626efc69bd3a374a7a7125d502
2018-01-24 20:48:54 +00:00
Jiyong Park
95f9313445 Don't use old VNDK and SystemSDK versions for new devices
We need to prevent vendors from using old VNDK and SystemSDK versions
for newly launched device. Otherwise, deprecating old versions of the
APIs would be really difficult.

Specifically, it is enforced that

PRODUCT_SHIPPING_API_LEVEL <= BOARD_VNDK_VERSION

PRODUCT_SHIPPING_API_LEVEL <= min(BOARD_SYSTEMSDK_VERSIONS)

Bug: 72126206
Test: manually setting BOARD_VNDK_VERSION to 24 in
device/google/wahoo/BoardConfig.mk and choosecom to walleye
Test: m -j shows an error on BOARD_VNDK_VERSION
Test: BOARD_SYSTEMSDK_VERSION="25 26" m -j shows an error on
BOARD_SYSTEMSDK_VERSION

Change-Id: I17646487a9c77a6a5110749e22ba47f0f75920cf
2018-01-24 09:59:09 +09:00
David Brazdil
33bb091971 Merge "Add new API file names" 2018-01-20 10:06:22 +00:00
Jaekyun Seok
0538ff796f Enforce PRODUCT_COMPATIBLE_PROPERTY for products shipping with Android P
PRODUCT_COMPATIBLE_PROPERTY will be set as true for products shipping
with Android P, and ro.actionable_compatible_property.enabled will be set
as a system default property accordingly.
But if PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE is set,
ro.actionable_compatible_property.enabled will be false.

Bug: 38146102
Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true
Merged-In: Ifc1279a360b140c4d94edd32db7de3c6c7317297
Change-Id: Ifc1279a360b140c4d94edd32db7de3c6c7317297
(cherry picked from commit 2528cd26c0)
2018-01-18 21:11:53 +09:00
David Brazdil
97b22ce9a8 Add new API file names
Doclava now generates new API signature files. Add their filenames
to config.mk.

Bug: 64382372
Test: make
Change-Id: I6aed1b2e0575ddb8c89cea5fa7709023eb6f30a3
2018-01-16 15:02:28 +00:00
Stephen Hines
504bd79e86 Merge "Remove unnecessary USE_CLANG_PLATFORM_BUILD." 2018-01-12 18:19:45 +00:00
Stephen Hines
178cf8e4d4 Remove unnecessary USE_CLANG_PLATFORM_BUILD.
This build variable is unnecessary now that GCC is completely
unsupported for Android platform builds.

Bug: http://b/64032869
Test: Builds
Change-Id: I9d44ebd7129cb2bdfbb26d37922db19c6fb9efc9
2018-01-11 14:29:23 -08:00
Yifan Hong
1e7ab9db8f Merge "framework_cm.xml: move to hardware/interfaces" 2018-01-11 19:14:24 +00:00
Yifan Hong
919dcf1b6e framework_cm.xml: move to hardware/interfaces
Test: m dist
Bug: 69636193

Change-Id: Ic15a445d700552cb0973d6919ed5843bdecba363
2018-01-10 16:32:04 -08:00
Dan Willemsen
ecae349e19 Switch to build-tools bison
Test: m
Test: mma external/dtc
Change-Id: Ia8e837f77238cb07e23de24f98c77aba9ff0f8dd
2018-01-08 17:38:33 -08:00
Treehugger Robot
ce5e4e251e Merge "Mark ANDROID_BUILD_TOP as obsolete" 2018-01-04 13:35:34 +00:00
Tobias Thierer
1644e2f1b7 Merge "Build with OpenJDK 9 -target 1.8 by default (attempt 4)." 2018-01-04 11:18:11 +00:00
Tobias Thierer
294111393e Build with OpenJDK 9 -target 1.8 by default (attempt 4).
This is cherry-picked from attempt 3, which was reverted
due to http://b/70862583.

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: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests

(cherry picked from commit ab1e54d5f1)

Change-Id: I119be15bd95747722114b970400b740fa47bf9e0
Merged-in: Ic42a518c90515b497e5cecec444ded373e403a4b
2018-01-04 11:08:14 +00:00
Dan Willemsen
07699636b0 Mark ANDROID_BUILD_TOP as obsolete
All users have been removed.

Test: check the build_test logs from aosp/master -> goog/master
Change-Id: I99e5630d7c13882c7667b0499c4f55633fa4535a
2018-01-03 15:15:38 -08:00
Colin Cross
5e0986cb51 Add R8 support to Soong.
Move R8_COMPAT_PROGUARD definition to Soong.
Copy the proguard_dictionary file so that the find
command that builds proguard_dict.zip can find it.

Test: m checkbuild
Change-Id: I28b2fce26ccb6225be0bd71802a43fe63df85daa
2018-01-03 14:21:35 -08:00
Dan Willemsen
74afb1d993 Switch some deprecated variables to obsolete
These are no longer used.

Test: check build_test logs for "has been deprecated"
Change-Id: Icb13891863d0b9b6a00e18d0f8f88e6306a24f8c
2017-12-27 16:59:38 -08:00
Treehugger Robot
15820578b2 Merge "Allow devices to extend the system manifest." 2017-12-23 01:17:24 +00:00
Steven Moreland
b14b530f82 Allow devices to extend the system manifest.
Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list
of files which are added to system/manifest.xml.
This is required for devices to properly display
what hals they implement and also therefore for
them to pass vts_treble_vintf_test since it
now tests manifests based on hal origin.

Notice, this is named singularly to match
DEVICE_MANIFEST_FILE which is also a list of files.
They may be better both named "FILES", but for
consistency and legacy reasons, they can be thought
of as "everything that composes the X manifest
file".

Fixes: 70042049
Test: add system manifest extension which needs it
  and it no longer fails vts_treble_vintf_test for
  hals being served from the wrong partitions.

Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5
2017-12-22 14:02:11 -08:00
Dan Shi
3c28ff7bff Merge "Auto generate test config files" 2017-12-21 21:53:12 +00:00
Tobias Thierer
1801a25d7c Merge "Pass OpenJDK 8's bootclasspath for host tools targeting <= 1.8." 2017-12-21 11:46:20 +00:00
Tobias Thierer
7e99d45ec2 Pass OpenJDK 8's bootclasspath for host tools targeting <= 1.8.
Host (as opposed to hostdex) tools compile and run against OpenJDK's
core libraries. Before this CL, the core libraries of the default
toolchain were always used, even when targeting an earlier language
version.

This meant that code that uses APIs from a later version of OpenJDK
than corresponded to LOCAL_JAVA_LANGUAGE_VERSION would compile, but
would fail to run under that earlier version of OpenJDK. It also
meant that calls to existing APIs might be reinterpreted; for
example, the return type of java.nio.ByteBuffer.clear() changed from
Buffer in OpenJDK 8 to ByteBuffer in OpenJDK 9. At compile time, this
was noted via the warning:
  bootstrap class path not set in conjunction with -source 1.8

After this CL, when targeting a language version <= 1.8 (which is
always the case when building with OpenJDK 8), some of OpenJDK 8's
core library/tools jars are now passed on the bootclasspath. The
decision to include the bootclasspath argument when building with
OpenJDK 8 was somewhat arbitrary, but has the advantage that we
discover any issues before we switch to OpenJDK 9.

Even when compiling with OpenJDK 9, use of OpenJDK 9 APIs will now
fail at compile time rather than at runtime; calls to existing APIs
will now be interpreted in OpenJDK 8 rather than 9 fashion. For
example, this means that dx and host-side CTS tests built with
OpenJDK 9 javac -target 1.8 will be runnable under OpenJDK 8.

Bug: 70521453
Bug: 70862583
Test: Checked that the bootclasspath argument was passed
      in the javac invocation targeting 1.8 during:
      make showcommands compatibility-common-util-hostsidelib
Test: make checkbuild

Change-Id: I9b6081edfdd2c3e9a450ae8a39c4e32c3d2cda92
2017-12-21 01:38:44 +00:00
Justin Yun
571737e8fc Set BOARD_VNDK_VERSION=current as a default value
For Android P or later launching devices, set BOARD_VNDK_VERSION to
"current" as a default value if the value is not defined yet.
"PRODUCT_USE_VNDK_OVERRIDE=false" can disable this feature.

Bug: 70480159
Bug: 62019611
Test: Unset BOARD_VNDK_VERSION
      Set PRODUCT_SHIPPING_API_LEVEL "28"
      - Check if BOARD_VNDK_VERSION is set to "current"
      Set PRODUCT_USE_VNDK_OVERRIDE to "false"
      - Check if BOARD_VNDK_VERSION is not defined

Change-Id: I8d37579e8c4ca1788705cbc8a42e8812e2b93a22
2017-12-21 08:15:19 +09:00
Dan Shi
efb892d858 Auto generate test config files
This change allows one to run atest <module name>. The TradeFed test
config file will be automatically created in testcases directory based
on the settings.

Bug: 69929803, 69932044
Test: m -j NotificationStressTests libminijail_test
add following lines in notificationtests/Android.mk,
before "include $(BUILD_PACKAGE)"
LOCAL_COMPATIBILITY_SUITE := general-test

Change-Id: Ib5e9cd152d957b5d5beb6ed23a899a021a7e06d6
2017-12-20 15:05:17 -08:00
Alan Leung
5260c8bdbc Merge "Revert "Enable R8 by default (third attempt)"" 2017-12-19 23:46:13 +00:00