Commit graph

265 commits

Author SHA1 Message Date
Dan Willemsen
11677ed983 Mark more common variables and paths as readonly
We've had a report of Android.mk files changing one of these paths,
leading to very strange issues. Nobody should be writing to these
variables after they're set.

Bug: 76424357
Test: diff build-aosp_arm.ninja
Change-Id: I66a9740d89feae342af13341ee3a630a20d62b64
2018-05-25 21:45:57 +00:00
Inseob Kim
47c13524aa Install product shared libraries in /product/lib
This is to support /product/lib. Shared libraries with
LOCAL_PRODUCT_MODULE := true or product_specific: true has been
installed in /system/lib. They are now installed in /product/lib.

Bug: 73095206
Test: build succeeded && product libraries are installed under
/product/lib

Change-Id: Ic49a0a3e1e47666c4d15189ab6fded8007ecb498
2018-05-04 15:05:02 +09:00
Dan Willemsen
92afd7d1e7 Accept TARGET_DEVICE_DIR preserved from previous product load
During a build, we load product configuration three different times --
to dump some initial variables, when parsing the CleanSpec.mk files, and
again when we parse the Android.mk files.

The BoardConfig.mk find commands use -path, which isn't supported by the
Kati find optimizer, so we end up spending ~125ms in each of the above
cases (on my machine, internal master -- aosp is closer to 30ms).

Instead, do the search during the initial dumping of variables, and pass
in TARGET_DEVICE_DIR into the later runs, using that to load the
BoardConfig.mk file.

Bug: 78020936
Test: out/build-taimen.ninja is identical
Test: out/soong.log shows that we're not running these finds again
Change-Id: I6f186e1879aa362528b48b8a00be3f7a9f88bfc5
2018-05-02 00:15:41 -07: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
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
Jiyong Park
641b6cc6b0 Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.

The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.

Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.

When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION  is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).

Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: If4d59f6030e4cc402e015701d0caf94aeec37263
2018-01-19 15:42:05 +09: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
Jae Shin
240d97a249 Apply snapshot variant to vndk package module name
VNDK snapshot phony package, vndk_v$VER, is redefined to
separate phony packages per VNDK snapshot build variant,
vndk_v$VER_$VARIANT, where $VARIANT is defined as the primary
$TARGET_ARCH of the build target.

Accordingly, top level Android.bp file under prebuilts/vndk/v$VER
is redefined as separate Android.bp files for each snapshot
variant at prebuilts/vndk/v$VER/$VARIANT/Android.bp.

Test: m -j PRODUCT_EXTRA_VNDK_VERSIONS=27 (after installing
snapshot to prebuilts/vndk/v27)
Bug: 71370248

Change-Id: Ida449978090fe8a4f16376c991d34fa0945be596
2018-01-04 10:23:19 +09:00
Justin Yun
2a233b3b86 Define PLATFORM_VNDK_VERSION
PLATFORM_VNDK_VERSION means the VNDK version that current build
provides. This value will be set to PLATFORM_SDK_VERSION once the
version is release. Otherwise, it will be set to "current".

Bug: 69883025
Test: device boot
Change-Id: I3fde4943aa062d9d148a3d7fc2798948870a48c6
2017-12-13 10:48:34 +09:00
Treehugger Robot
0765d53239 Merge "Add build script to generate TF test XML file with filters" 2017-12-06 22:51:43 +00:00
Justin Yun
9272ef87a6 Check conformity of VNDK version
Allow BOARD_VNDK_VERSION=<version> only if the prebuilt VNDK for
the <version> is provided.

If PRODUCT_EXTRA_VNDK_VERSIONS is set, all the versions in the list
will be checked as well.

Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: Set BOARD_VNDK_VERSION := current and check build
Test: Set PRODUCT_EXTRA_VNDK_VERSIONS := 27 and check if it returns
      error when prebuilts/vndk/v27/Android.mk is not provided

Change-Id: I2e43d71f1ea3717ab8c45de84c926ecc43193307
2017-12-05 10:23:44 +09:00
Dan Shi
26efd3a8d1 Add build script to generate TF test XML file with filters
Bug: 68270274
Test: run 'atest' in frameworks/base
Change-Id: I99b741fae18997caa6aefbd3ab804e5d30e7ae36
2017-11-13 14:48:10 -08:00
Dan Willemsen
2a6e3b00b0 Turn off Windows builds during BUILD_HOST_static
We can only create static host binaries for Linux, so if static host
binaries are requested, turn off Windows cross-builds.

Test: m zipalign BUILD_HOST_static=1
Change-Id: Ib37508d4b502cd56dad535cb6eab648f625486c6
2017-11-06 11:12:09 -08:00
Treehugger Robot
cf2da22a2a Merge "Re-apply ndk-docs rule." 2017-10-13 21:04:26 +00:00
Dan Albert
303e603fd2 Re-apply ndk-docs rule.
This time wrapped with a check for the docs directory for unbundled
branches.

Test: make checkbuild
Bug: None
Change-Id: If80f0a03850d6cad3eab6d759af02ff2a7870974
2017-10-13 11:56:17 -07:00
Dan Willemsen
20f99a60ea Use CALLED_FROM_SETUP instead of KATI
So that we can use kati instead of make for the initial config loading.

Test: m clean; m nothing
Test: USE_GOMA=true m nothing
Test: m PRODUCT-aosp_x86-sdk
Test: m APP-Calculator
Test: multiproduct_kati -only-config  (on AOSP and internal master)
Change-Id: I5d3af847607fa48868c2045401977eca37dc6ae1
2017-10-12 15:35:42 -07:00
Colin Cross
c294f55489 Revert "Generate the NDK docs with the ndk-docs target."
This reverts commit d51b6d0d75.

Reason for revert: Broke all unbundled builds

Change-Id: Id6722a076ee91ca150b1a53935632579c6f6f6dd
2017-10-04 00:13:00 +00:00
Dan Albert
d51b6d0d75 Generate the NDK docs with the ndk-docs target.
Test: make ndk-docs
Bug: None
Change-Id: I846f18c2d466d18603bb3ba59aaed7a9c938b1e3
2017-10-03 13:08:25 -07:00
Colin Cross
69b7f3f0b1 Move jacocoagent into the bootclasspath
Move jacocoagent out of core-libart and into its own jar on the
bootclasspath.

Test: m -j EMMA_INSTRUMENT=true
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L19400000103297394&nodeType=Trybot
Change-Id: I9e6e3dc59dba8b93685d59b258d4ebc7835eab8b
2017-09-15 22:27:35 +00:00
Dan Willemsen
d6ed368fde Remove (TARGET|HOST)_BUILD_TYPE path modifications
They don't really affect anything general in android except for the
output path. Debug builds have been broken due to Soong not respecting
*_BUILD_TYPE, and with ninja, we'll properly rebuild if you switch
between release and debug flags. So just remove the path difference.

Bug: 65453318
Test: TARGET_BUILD_TYPE=debug m
Test: code search to find all the users
Change-Id: I5c6a322e0187d96cdaeef891778508c698f841e0
2017-09-08 14:33:34 -07:00
Andreas Gampe
4ed21d10e8 Build: Change SANITIZE_LITE install settings
Under SANITIZE_LITE, the default app_process is not instrumented.
Embedding sanitized libraries into APKs will lead to crashing apps.
So move second-stage APKs to /data/asan.

The tradeoff is that for now we won't run these sanitized binaries.
Adding support for that is future work.

Also do not do a rebuild of the boot image. This would invalidate
the first-stage results. Note that this is technically dangerous,
as stack overflow guard sizes will not be adapted for ASAN runs.
However, this is a general incompatibility.

Also do not rebuild system_other. Apps are not rebuilt, so it will
create an empty image.

(cherry picked from commit 481660ef34)

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true
Merged-In: I3898bc53cad264529f126e6bf0af9c6ca1736877
Change-Id: I3898bc53cad264529f126e6bf0af9c6ca1736877
2017-08-31 08:56:18 -07:00
Dan Willemsen
ce7f8dd15a Run uname -sm once, don't use python for HOST_OS_EXTRA
This saves 20-50ms for `lunch` (~7-10%), and double that for every build
execution.

Test: Check HOST_OS_EXTRA on Linux & Mac
Change-Id: I863200b2287c8867f40606237895b1d3ad91e1b3
2017-07-26 10:49:22 -07:00
Steven Moreland
cbfba70a9f Define paths for vendor native tests.
Test: manually check paths are desired using:
  $(error $(TARGET_OUT_VENDOR_NATIVE_TESTS))
  with both 'm -j' and 'm -j BOARD_VNDK_VERSION=current'
Fixes: 62495833
Change-Id: I236718f845d8ab604a0aec06b3220bc1c4f3d36b
2017-07-13 15:46:00 +00:00
Igor Murashkin
9d4639c8c2 core: Move core.oat bootjar definitions into envsetup.mk
TARGET_CORE_JARS and HOST_CORE_JARS define the minimal
bootclasspath jars necessary to run with dalvikvm/art.

Also refactor PRODUCT_BOOT_JARS in core-tiny.mk and core-minimal.mk
to reuse TARGET_CORE_JARS.

The above variables can be used from scripts with get_build_var
from envsetup.sh

  $> get_build_var TARGET_CORE_JARS
  <prints list of core jars>

(These changes are required to figure out what --bootclasspath_entry
to pass to desugar).

Bug: 36902714
Test: make -j32 build-art-host build-art-target
Test: lunch aosp_angler-userdebug && make -j32
Test: make -j32 PRODUCT-sdk_google_aw_x86-sdk
Merged-In: If12569719343bfbba20c1cda9a5302ab541dbfc6
Change-Id: If12569719343bfbba20c1cda9a5302ab541dbfc6
2017-06-16 00:54:47 +00:00
Dan Willemsen
ccc48163ea Fix ALLOW_MISSING_DEPENDENCIES in PDK builds
ALLOW_MISSING_DEPENDENCIES was being set up before TARGET_BUILD_PDK, so
PDK builds were not triggering ALLOW_MISSING_DEPENDENCIES.

Bug: 62086238
Test: m -j nothing (check out/soong/soong.variables for AllowMissingDependencies)
Test: PDK_FUSION_PLATFORM_ZIP=test.zip m -j nothing (check AllowMissingDependencies)
Change-Id: I70919fbc7e397e55356cb467c6218cf6e7279c6c
2017-06-02 15:25:20 -07:00
Colin Cross
2ddbcdf3a7 Pass TARGET_BUILD_PDK to soong
Also enable ALLOW_MISSING_DEPENDENCIES when TARGET_BUILD_PDK is set
so that soong modules can reference modules that are disabled in the
PDK.

Test: builds
Bug: 62086238
Change-Id: Ic43e843a717b802ace0cee568b9e7e561a6c0868
2017-05-25 10:29:19 -07:00
Vishwath Mohan
d8eabaa6c7 Enable incremental builds for ASAN. (make)
This CL gets us closer to having incremental builds for ASAN by
separating the generation of sanitized intermediates from their
non-sanitized counterparts.

Bug: 38145756
Test: time (m -j40 && SANITIZE_TARGET="address" m -j40) # reduces from
17 mins to ~9 mins with these changes.

Change-Id: I7e3e7d88d276d834192b2e2427643f70e89d731e
2017-05-18 09:50:44 -07:00
Vishwath Mohan
d4dbf7921d Always use non-sanitized library locations for JNI.
This CL changes the build system to always look for shared JNI
libraries at their unsanitized install locations.

Bug: 38309771
Test: m -j40 && SANITIZE_TARGET="address" m -j40
Change-Id: Icb9d4f5365def6ea7a780553f455f41d2cb8b8bf
2017-05-17 11:02:20 -07:00
Dan Willemsen
b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00
Vishwath Mohan
b285c46bbd Refactor sanitized library on-disk layout - Make.
This CL moves the location of ASAN-ified libraries on disk in the
following manner:
/data/lib* --> /data/asan/system/lib*
/data/vendor/* --> /data/asan/vendor/*

There are a couple of advantages to this, including better isolation
from other components, and more transparent linker renaming and
SELinux policies.

Bug: 36574794
Bug: 36674745
Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device
boots. All sanitized libraries are correctly located in /data/asan/*.

Change-Id: Ic6ba8e43e31df2ea92b85fd60f572823b6883ba2
2017-03-30 20:14:27 -07:00
Treehugger Robot
4ef5040cc3 Merge "Ensure that BOARD_VNDK_VERSION is current" 2017-03-29 04:34:29 +00:00
Colin Cross
c901659377 Add min and max supported versions
Add MIN_PLATFORM_VERSION and MAX_PLATFORM_VERSION to track
the range of releases that are expected to be released from
the current branch.

Also simplify version_defaults.mk by moving most of the code
to envsetup.mk.

Test: build/make/tests/envsetup_tests.sh
Change-Id: I4f19c31c267e202f8f5ba1384a8b4385d725f9d7
2017-03-28 13:32:04 -07:00
Dan Willemsen
2c3289bf37 Ensure that BOARD_VNDK_VERSION is current
BOARD_VNDK_VERSION controls which version of the VNDK is used for the
build. We only support compiling against the current VNDK, and we don't
support installing old prebuilt VNDK libraries yet, so ensure this
variable is set to "current".

Once we support installing old prebuilt VNDK libraries, we'll also need
to disable building modules that use the VNDK.

Test: build-aosp_arm.ninja is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Test: Set BOARD_VNDK_VERSION := invalid
Change-Id: Ic26c9f44e356a0734f522b4538cb866d5b901d43
2017-03-27 22:55:21 -07:00
Colin Cross
8873713f36 Add TARGET_PLATFORM_VERSION to lunch
lunch can now take combos in the form:
$TARGET_PRODUCT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT-$TARGET_PLATFORM_VERSION

If all 3 are not specified the unspecified ones will take the
default values provided by the build system (eng, and currently
OPR1).

In addition, error handling for invalid products, variants and
versions is moved to the build system.

Bug: 34972208
Test: build/make/tests/envsetup_tests.sh
Change-Id: Ib0aaa98633448ba9bd8df911704c9cb3a8ebbe85
2017-03-23 09:44:08 -07:00
Miao Wang
57be564940 Add TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE definition.
- TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE is the output directory of
 RENDERSCRIPT_BITCODE (libclcore.bc) for vendors.
 - It is only used if LOCAL_PROPRIETARY_MODULE := true specified for the
 bitcode module.

Bug: 34396220
Bug: 34334222
Test: mm
Change-Id: I10237470eff0d8a693ce73313944e9b24595c5b7
2017-03-02 15:48:24 -08:00
Dan Willemsen
0d25529b4c Stop double-printing config
Don't print the config in Kati when we've already printed it in soong_ui
or the make wrapper.

Test: m -j
Test: USE_SOONG_UI=true m -j
Change-Id: Ic6dce0ab29d584d85c6642c597f6e9dcd6ba9dca
2017-02-21 15:12:15 -08:00
Dan Willemsen
8dae49c5e1 Add Header Library support to Make
We currently use static libraries without any source files to represent
header libraries, but Soong actually has cc_library_headers. So to
export those in a separate namespace from static libraries, implement
them in Make as well.

This also adds a nice pretty-warning / pretty-error macro that can be
used to print out standard warning messages pointing to the real source
file having the problem.

Test: Use a header library exported by Soong in a Make module
Change-Id: I3486539e247524cb82a20620745fc7be03014e14
2017-02-15 16:04:49 -08:00
Simran Basi
7166d1f43a Output *TS testcases to common testcase folders.
Aggregates the different *TS testcases into two common folders,
one under each the host and product hierarchies.

Bug: 34715822
Test: `make cts -j` and checked the contents of both:
out/host/linux-x86/testcases/ &
out/host/linux-x86/cts/android-cts/testcases/

Change-Id: I7d5201998ddcb011ecc687c272a0d0a36da248b7
2017-02-07 14:49:06 -08:00
Dan Willemsen
00cf76767f TARGET_RECOVERY_UPDATER_LIBS should not be used with AB updates
Also mark these variables as readonly so that later Android.mk cannot
change them.

Bug: 33607778
Test: build/tools/kati_all_products.sh -j12
Change-Id: I5f9a4df02bfdfd56549728f074bbb3fc251edb3d
2017-01-04 17:36:30 -08:00
Treehugger Robot
1a4a0a4539 Merge "Define TARGET_OUT_VENDOR_APPS_PRIVILEGED for 2nd arch" 2017-01-04 02:44:04 +00:00
Dan Willemsen
dc556b4bc0 Prohibit host modules from using LOCAL_COPY_HEADERS
am: 6e51ef61a7

Change-Id: Id7c80e4dba5a505a04ce47d459c0a525debc4d53
2016-11-29 20:42:37 +00:00
Dan Willemsen
6e51ef61a7 Prohibit host modules from using LOCAL_COPY_HEADERS
There are no users left, so remove all of this.

Test: lunch aosp_arm-eng; m -j native
Test: build/tools/kati_all_products.sh on aosp and internal master
Change-Id: I32f5c8b470a43dd203d7e20c192167630e4e6888
2016-11-28 13:46:17 -08:00
Ryan Campbell
4fac69d7ca Merge "Fix typo in coverage target out path." am: c6507670f2 am: 1fd609359d
am: ee20a35082

Change-Id: I0606159c8917927e4c8b4ad6ff67e73ba9473085
2016-09-16 02:19:03 +00:00
Ryan Campbell
737bc02ee8 Fix typo in coverage target out path.
Change-Id: I4a448708ab74e08b2c515039ee5d71c32861214e
2016-09-15 17:32:13 -07:00
Ryan Campbell
5a63fe6856 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb
am: 577eab3323

Change-Id: I36a4fc67e87e8561486111263b0d6b6ed1bdefcc
2016-09-13 20:01:23 +00:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00
Colin Cross
3de35b8ada Merge "Remove HOST_PREFER_32_BIT" am: 182ff5e2e7 am: a128976547
am: 0ab4eb9734

Change-Id: I5834da777a75fb0c269de886f0233e8796c6aee7
2016-09-03 00:38:55 +00:00
Colin Cross
70e0ac6bc1 Remove HOST_PREFER_32_BIT
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.

Change-Id: I874f89c7d1e9cd8c9d4c879048d81a4362ce4dce
2016-09-02 13:20:52 -07:00
Dan Willemsen
7d72b5ef71 Merge "Fix GET-INSTALL-PATH to work with Soong" am: 6b9aa6938d am: 9fc9cac0ac
am: 0e642c3e55

Change-Id: Ic608a11b5b7ccf78f75bbf4ce7086ed92e1b9e14
2016-08-15 21:26:31 +00:00
Dan Willemsen
9fc9cac0ac Merge "Fix GET-INSTALL-PATH to work with Soong"
am: 6b9aa6938d

Change-Id: I9f433cb383846ec6ccb8e39be4b30110d60d54fd
2016-08-15 21:17:33 +00:00
Dan Willemsen
53e3899222 Fix GET-INSTALL-PATH to work with Soong
This was printing all of the Soong modules in addition to the modules
defined in the ONE_SHOT_MAKEFILE. So replicate what we did with
MODULES-IN-* with GET-INSTALL-PATH-IN-* and update all the users.

Bug: 30191725
Change-Id: Ib1e4bf00f64d7a3e8cd91f44eaf1ff82fdfbf162
2016-08-12 05:10:51 +00:00
Alexey Polyudov
74140b99c4 Merge "introduce AUX build class of targets" am: 556526bf95 am: 755391d77e
am: 30937fbde2

Change-Id: I73aa67afa95b8c45c5a4e310a340bc709d0b3da0
2016-08-02 22:55:18 +00:00
Alexey Polyudov
755391d77e Merge "introduce AUX build class of targets"
am: 556526bf95

Change-Id: I52b4b3a561ceb9c1fbe71ce75a4ef4aa252a9665
2016-08-02 22:50:21 +00:00
Alexey Polyudov
ccdc311b33 introduce AUX build class of targets
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable

Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-02 08:06:28 -07:00
Hung-ying Tyan
665e740792 Define TARGET_OUT_VENDOR_APPS_PRIVILEGED for 2nd arch
Build error when LOCAL_PROPRIETARY_MODULE, LOCAL_PRIVILEGED_MODULE,
and LOCAL_MULTILIB := 32 are set for a module in 64-bit build.

The patch adds path definition for
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED

Change-Id: I2fe0c0f28fb7e4a27defd3a1b04f84c8b296294f
2016-07-20 17:51:56 +08:00
Andreas Gampe
397a0fe021 Merge \\\"Build: Fix vendor sanitizer library for secondary arch\\\" am: 2302a76966 am: 80b32402dc
am: 2aac82f27c

Change-Id: I55e4d2c2718a49c9929601edefaf2845456eb854
2016-07-01 04:41:35 +00:00
Andreas Gampe
80b32402dc Merge \"Build: Fix vendor sanitizer library for secondary arch\"
am: 2302a76966

Change-Id: I2b21579df22b08655cdc9eab2d570304b167b5b6
2016-07-01 04:33:43 +00:00
Andreas Gampe
cf6268f471 Build: Fix vendor sanitizer library for secondary arch
Fix the directory for secondary-architecture libraries under
sanitization. These incorrectly wrote into vendor/lib instead
of data/vendor/lib.

Bug: 29498013
Change-Id: Iee08422a1f7ad42cbe71a322347e98cb74e3ef7f
2016-06-30 20:20:38 -07:00
Alex Light
a3e8e9c6f3 resolve merge conflicts of 3f7c348 to nyc-mr1-dev-plus-aosp
Bug: 29278988

Change-Id: Icffb9a280311c7d3c45f096243ddf18f7ebecd9d
2016-06-29 15:43:54 -07:00
Dan Willemsen
db9f3489bc Merge \"Detect \uname -m\ == i686 as a 32-bit host\"
am: 55d4a46f6d

Change-Id: Ia66952b98541755c55df1eb98775d749d2155dc1
2016-06-29 20:39:42 +00:00
Dan Willemsen
88225fdfbe Detect uname -m == i686 as a 32-bit host
Change-Id: I0350629ce6ea7a5f0224489bafc98bc190e70932
Test: UNAME from https://groups.google.com/d/msg/android-building/nGQna2xuW5s/eEcXSo9ZBgAJ
2016-06-29 12:30:56 -07:00
Alex Light
4e358ab2c3 Add system_other partition, install odex files
For AB devices, support flashing two system partitions for factory use.
The normal system image on one partition, but without dex preopt. And a
system_other image that just contains the odex files. The dex files will
not be stripped out of the system image, in case the second system
partition is wiped.

Setting BOARD_USES_SYSTEM_OTHER_ODEX := true in the BoardConfig.mk
enables this behavior.

One can control which directories are placed in system_other by the
SYSTEM_OTHER_ODEX_FILTER configuration variable. Currently we default
to only copying only app and priv-app odexs.

Bug: 29278988
Change-Id: I7f4e87da919e7dc6a89fd8c668193cd4e98631bc
2016-06-24 11:07:15 -07:00
Dan Willemsen
edc6ed7aa0 Merge \"Clean up vendor image handling\"
am: 4f807026e2

Change-Id: I637ed099a6f127aa8abca980329ddc6ecad5e3ec
2016-06-21 22:00:21 +00:00
Dan Willemsen
6c3e79b8e3 Clean up vendor image handling
Standardize symlinking /system/vendor -> /vendor for aosp_* devices,
since some /vendor binaries still use /system/vendor/... paths.

Support using a prebuilt vendor image and including it into all the
normal packaging steps.

Bug: 28987532
Change-Id: I27040e8a8d1df0777e16cd1e3c3a9f1b28695e96
2016-06-18 17:47:12 -07:00
Dan Willemsen
32b36a8819 Merge "Add NATIVE_TESTS class, move host native tests" am: e72fc63901
am: 10461b78f0

* commit '10461b78f0955d9dba8d32045d1e35ff0f9a5c8c':
  Add NATIVE_TESTS class, move host native tests

Change-Id: Ia11b54676d3b33e58c177a5a375f29233657524e
2016-06-07 00:09:39 +00:00
Dan Willemsen
e72fc63901 Merge "Add NATIVE_TESTS class, move host native tests" 2016-06-06 23:59:23 +00:00
Dan Willemsen
6532011f9f Merge "Add Soong tools to PATH" am: b09e644e1d
am: 28874dc0c1

* commit '28874dc0c1c790005672406ea50729579096d6f4':
  Add Soong tools to PATH

Change-Id: I5a8f9a27a651c1c79469e53daa1cc34a6febbbc8
2016-06-01 02:49:05 +00:00
Dan Willemsen
60d9c673d7 Add Soong tools to PATH
Change-Id: I8f8649106df4ba7cefbfa37a724ebe0635d90b76
2016-05-31 18:32:35 -07:00
Colin Cross
6f8244b62d Merge "Fix mm and mmm in Android.bp directories" am: 8ed91b6624
am: 323396993c

* commit '323396993c6651b4b98974df9e9d53118f27a840':
  Fix mm and mmm in Android.bp directories

Change-Id: I95d6bde7a0ea72b47779f1a5b0577ff423524b6f
2016-05-27 00:29:14 +00:00
Treehugger Robot
8ed91b6624 Merge "Fix mm and mmm in Android.bp directories" 2016-05-27 00:23:24 +00:00
Colin Cross
8642525726 Fix mm and mmm in Android.bp directories
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file.  Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.

Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
2016-05-26 15:56:21 -07:00
Dan Willemsen
238f4aafd2 resolve merge conflicts of dfcf2e0 to nyc-dev-plus-aosp
Change-Id: I5473ac42db3dba12dffb1d40eb9096d738ef977b
2016-05-26 15:01:20 -07:00
Dan Willemsen
056609ccfe Remove unnecessary variables
These are all either recently unused due to the removal of CFLAGS/etc,
or have been exported by Soong and are no longer necessary.

Change-Id: I5930d43fda21acc8202b3d8ea010fbefb6ae4cf1
2016-05-25 21:23:20 -07:00
Dan Willemsen
7fe992c0cc Add NATIVE_TESTS class, move host native tests
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.

So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].

Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.

Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.

Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d
2016-05-24 12:43:16 -07:00
Colin Cross
ca5083195e Merge "Error on USE_CLANG_PLATFORM_BUILD=" am: 7b31dd1094
am: 893f32053f

* commit '893f32053f78def4582ceb54b19ddb1253b73495':
  Error on USE_CLANG_PLATFORM_BUILD=

Change-Id: Ibc43aee7aecb6526436be08e78622a2e4690e71c
2016-05-23 22:21:46 +00:00
Colin Cross
b267cbabba Error on USE_CLANG_PLATFORM_BUILD=
A blank USE_CLANG_PLATFORM_BUILD= on the command line for make causes
confusion between make and kati.  make ignores writes to variables set
on the command line, so envsetup.mk cannot set it to true,
USE_CLANG_PLATFORM_BUILD is still empty in soong.mk, and soong.variables
gets DeviceUsesClang: false.  kati gets USE_CLANG_PLATFORM_BUILD= in its
environment instead of on its command line, so envsetup.mk when parsed
by kati sets USE_CLANG_PLATFORM_BUILD=true.

Error out early if USE_CLANG_PLATFORM_BUILD is not true or false after
attempting to set it to true if it is empty.

Change-Id: I0e2731315711db9a6ac6ea2bf49c88bccacd35f7
2016-05-19 13:39:37 -07:00
Guang Zhu
97069b07c3 resolve merge conflicts of bc3720c to nyc-dev-plus-aosp
Change-Id: I2372a61a39131ede33cda95afc3c3ddd19e542f0
2016-04-12 13:06:20 -07:00
Julien Desprez
188a1dd18f Benchmark have their own folder
Benchmark tests use a separate folder from native tests.

Bug: 27465556
Change-Id: Ife0f43062e36ffc856f41683ddc4d91a7787333e
2016-04-12 18:57:36 +01:00
Ying Wang
87538e4f8b Support x86+arm multilib build.
Support TARGET_2ND_ARCH as the binary translation arch.
See target/board/generic_x86_arm/BoardConfig.mk and
target/product/aosp_x86_arm.mk as example for the setup.

In BoardConfig, use the TARGET_2ND_ARCH/etc. variables to set up the
binary translation arch;
Set "TARGET_TRANSLATE_2ND_ARCH := true" to tell the build system it's
not a typical 64-bit multilib configuration.
In product makefile, use "PRODUCT_PACKAGES += libfoo_<2nd_arch>" to
install the TARGET_2ND_ARCH libraries. This also pulls in any dependency
libraries.
By default we don't install any TARGET_2ND_ARCH modules, unless it's
pulled in by PRODUCT_PACKAGES.

Bug: 27526885
Change-Id: I0578e9c80da0532d2fa886a8fcdb140bbc703009
(cherry-pick from commit 277e75a488)
2016-03-25 13:29:53 -07:00
Todd Kennedy
27c3223a77 Merge "Define TARGET_OUT_VENDOR_APPS_PRIVILEGED" 2016-03-09 20:54:22 +00:00
Ying Wang
7dfdb843b2 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759

(cherry picked from commit 08800fd905)

Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
2016-03-04 14:02:03 -08:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Dan Willemsen
7e57b8ca57 Add 64-bit windows cross-compiles
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.

The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.

  windows-x86/bin   <- defaults to 32-bit executables
  windows-x86/lib   <- 32-bit libraries, like before
  windows-x86/lib64 <- 64-bit libraries
  windows-x86/obj   <- 32-bit intermediates
  windows-x86/obj64 <- 64-bit intermediates

Then modules are registered with the names:

  host_cross_liblog    <- 32-bit, like before
  host_cross_liblog_64 <- 64-bit

Bug: 26957718

(cherry picked from commit 9ecbf83259)

Change-Id: Iab2d36e20d7002568c3534e7781e9ac8ab21a4a9
2016-02-26 18:51:26 -08:00
Dan Willemsen
c12ad5c5c0 Define a class for renderscript bitcode files
These have been using SHARED_LIBRARIES, but aren't elf shared libraries.
Continue installing them to /system/lib[64], but do not apply any other
normal shared library logic to them.

(cherry picked from commit c6e194ffad)

Change-Id: I0041650af92cd8063ca33215010d5eff514a89bc
2016-02-18 17:34:53 -08:00
Dan Willemsen
c6e194ffad Define a class for renderscript bitcode files
These have been using SHARED_LIBRARIES, but aren't elf shared libraries.
Continue installing them to /system/lib[64], but do not apply any other
normal shared library logic to them.

Change-Id: I3055ff86bb7b116c7107c41578ed6f0f304b1cf1
2016-02-13 00:19:40 -08:00
Dan Willemsen
9ecbf83259 Add 64-bit windows cross-compiles
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.

The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.

  windows-x86/bin   <- defaults to 32-bit executables
  windows-x86/lib   <- 32-bit libraries, like before
  windows-x86/lib64 <- 64-bit libraries
  windows-x86/obj   <- 32-bit intermediates
  windows-x86/obj64 <- 64-bit intermediates

Then modules are registered with the names:

  host_cross_liblog    <- 32-bit, like before
  host_cross_liblog_64 <- 64-bit

Bug: 26957718
Change-Id: I9f119411acb43e973ec1e6bca3c1dc291c91556c
2016-02-05 16:33:18 -08:00
Josh Gao
f3e7204bef Error out if MALLOC_IMPL is defined.
Bug: http://b/26390299
Change-Id: Icd3ce6853c8207b1a9ce1f9d546a61d5b113f15a
2016-01-22 11:25:24 -08:00
Chih-Hung Hsieh
8dd69d97f6 Set USE_CLANG_PLATFORM_BUILD to default true.
BUG: 26102335
Change-Id: I3b9fa2dfbee361410caf163147945ab448bb8ddf
2016-01-19 11:43:44 -08:00
Will Drewry
c13f9c952d envsetup,product,ninja: enable symlink traversal
When searching device, product, or hardware, allow
find to follow symlinks.

Add KATI_EMULATE_FIND=false to allow disabling the find
emulator which changes findleaves.py behavior wrt
symlinks.

BUG=24605247
TEST=works with CL:783781 (without the find wrapper in that CL)

Change-Id: Ia9d0e4add391a56f34828a09a6cec3f435ccc548
2015-11-02 14:18:45 -08:00
Benjamin Pujol
e68a277e59 Define TARGET_OUT_VENDOR_APPS_PRIVILEGED
When LOCAL_PROPRIETARY_MODULE is set to true when building an apk with,
LOCAL_PRIVILEGED_MODULE set to true, the path is unknown.

Add TARGET_OUT_VENDOR_APPS_PRIVILEGED to path definitions.

Change-Id: Icbbafba96b7880f51ca3afcee53d5f3dd5b86a45
Signed-off-by: Benjamin Pujol <benjamin.pujol@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2015-10-21 12:00:04 +08:00
Dan Willemsen
05bb4fed0d am edc3e6cd: Merge "Sort more instances of wildcard and find"
* commit 'edc3e6cd6a0d6af4df3d6f07f40de17980b66ad0':
  Sort more instances of wildcard and find
2015-09-30 23:44:10 +00:00
Dan Willemsen
7c3e3f8314 Sort more instances of wildcard and find
Many of these may not make a difference in the output images, but it's a
good idea to keep the make system as repeatable as possible.

Change-Id: I31804b8ad5805148ed08be7426a242a16f4d0df3
2015-09-30 22:25:49 +00:00
Steve Fung
db4cba4a08 am 562ad0b5: Merge "Package breakpad symbols in target files zip"
* commit '562ad0b5e4f5d49fc62e72ca1d6eb18acab6e90b':
  Package breakpad symbols in target files zip
2015-09-28 20:24:32 +00:00
Steve Fung
dfbab49bed Package breakpad symbols in target files zip
When BREAKPAD_GENERATE_SYMBOLS is set to true, package the breakpad
symbols into the target files zip thats generated with `make dist`.

Bug: 24165970
Change-Id: I11c0d9a9d9e159475bfdb7bc338f9e9ac60aeada
2015-09-25 18:34:15 -07:00
Evgenii Stepanov
f267f7147f am 908260a5: Merge "Add support of SANITIZE_TARGET=\'address coverage\' for fuzzing."
* commit '908260a56631cad51196c7b197f720bc88d7f5c7':
  Add support of SANITIZE_TARGET='address coverage' for fuzzing.
2015-09-18 20:31:54 +00:00
Ivan Krasin
74b32b8dfc Add support of SANITIZE_TARGET='address coverage' for fuzzing.
Also, add trace-cmp instrumentation to fuzz_test and host_fuzz_test.

Bug: 22850550
Change-Id: Ifff7b8be693ae991feb0a64e19439370a19b2748
2015-09-18 11:54:43 -07:00
Dan Willemsen
c98d9a9d0f am f1c09d7f: Merge "Add HOST_CROSS_OS"
* commit 'f1c09d7fbd92a08cc51950a7d35fb5f7fc564a20':
  Add HOST_CROSS_OS
2015-09-09 18:19:13 +00:00
Dan Willemsen
057aaea54a Add HOST_CROSS_OS
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.

Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
2015-09-09 18:12:29 +00:00
Dan Willemsen
1b14846717 am 48d95e75: am 05d97fe7: Merge "Remove legacy windows platform build support"
* commit '48d95e752536dc7a81c141e435e8a90b7929cf02':
  Remove legacy windows platform build support
2015-08-18 04:43:04 +00:00
Dan Willemsen
145ae32069 Remove legacy windows platform build support
We still support HOST_OS=windows for the SDK host tools cross-builds, but
that's only when USE_MINGW is set when running under linux.

Change-Id: I37da87dc9fbbd69ba10ce4d7f2668ab3f6482d92
2015-08-17 12:35:04 -07:00