Commit graph

238 commits

Author SHA1 Message Date
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
Ying Wang
0a1026ce27 am ede3e310: am 2c0c1e56: Merge "Build 64-bit host tools in Linux/Mac SDK build."
* commit 'ede3e3103565175fc15b76cd6f9daf7e2b93393b':
  Build 64-bit host tools in Linux/Mac SDK build.
2015-08-01 17:35:31 +00:00
Ying Wang
5c28bda966 Build 64-bit host tools in Linux/Mac SDK build.
With this we build 32-bit host tools in only MinGW Windows build.

Bug: 22776595
Change-Id: Icca02b0f629460449a3437ff1769d4d081e92413
2015-07-31 09:24:15 -07:00
Evgenii Stepanov
ff57fb45c7 am be8dd615: am 473dfdf7: Merge "Move sanitized vendor libraries to /data/vendor/lib(|64)."
* commit 'be8dd6154b021b78422df44c4a7841899cc24866':
  Move sanitized vendor libraries to /data/vendor/lib(|64).
2015-06-30 22:02:47 +00:00
Evgenii Stepanov
bf140974b2 Move sanitized vendor libraries to /data/vendor/lib(|64).
Sanitized RPATH now mentions /system/vendor/lib to preserve overlay
in the case when a sanitized version of a vendor library can not be
built.

Bug: 22199458
Change-Id: I3222d2e1d6c08fdd1e0404fcb7db347aa4a92bb7
2015-06-30 14:04:45 -07:00
Evgenii Stepanov
a43f213c78 am 5f41fc3d: am eac1f6ed: Merge "With SANITIZE_TARGET, move shared libraries to /data."
* commit '5f41fc3d4d12cd5d1dd195c7369661e5b516c310':
  With SANITIZE_TARGET, move shared libraries to /data.
2015-06-19 21:27:42 +00:00
Evgenii Stepanov
4d3d4141ae With SANITIZE_TARGET, move shared libraries to /data.
A fully (or even mostly) asan-instrumented device will have 2 copies of each
shared library, which might not fit on system partition. Moving instrumented
libraries to /data.

Bug: 21785137
Change-Id: I64184261da2eb24a1382c67e4931c34a5a38b3c0
2015-06-19 11:15:50 -07:00
C. Sean Young
3c11468252 am 6f44670a: am cbaead4c: am 540772fa: am cf469989: Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
* commit '6f44670ada093f4a11a343dddf0f8d0a0a8280d6':
  Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
2015-06-12 18:05:03 +00:00
C. Sean Young
cbaead4cfe am 540772fa: am cf469989: Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
* commit '540772fa2287e63a0c745229fb72b78903c9cd70':
  Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
2015-06-12 16:29:25 +00:00
C. Sean Young
cf4699895a Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
These directories are excluded in addition to OUT_DIR.
This can be useful if your build system has other output directories
beyond what OUT_DIR is set to.

Change-Id: I6d98a85bcc8c89279e939406a7fec32547e8922f
2015-06-10 13:00:13 -05:00
Ying Wang
080f57aed7 Merge "Remove the unnecessary full_x86_64 and full_mips64." 2015-06-08 19:01:47 +00:00
Ying Wang
0a76df5ce7 Remove the unnecessary full_x86_64 and full_mips64.
For historical reason, the aosp_* products were named full_*.
We keep the full, full_x86 and full_mips in case some tools still
reference these legacy names; But no reason the have the full_* product
names for the new 64-bit archs.

Change-Id: I240ed0c6ded0ded2d80603bd0c5ff24750999afc
2015-06-08 11:57:26 -07:00
Ying Wang
4540a85dd4 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
2015-06-03 09:56:29 -07:00
Dan Albert
dc94137927 Make Windows a non-multilib target.
We don't have a toolchain for 64-bit windows.

This allows running `USE_MINGW=1 mm` in a directory that has a host
module with LOCAL_MULTILIB := both.

Change-Id: I31f981b38fb80b0d6582bab0a4bd580a3c654c91
2015-05-05 15:46:50 -07:00
Dan Albert
216ecac61e Fix prebuilts for target builds with USE_MINGW=1.
USE_MINGW=1 mm didn't work in directories that contained target modules
because the build system would use the Windows locations and extensions
when trying to find the host GCC prebuilts. Windows is the target OS,
not the OS we're building from.

Change-Id: Ic994fed15388d0c7d393f71ba28fe7afdc659f5c
2015-05-04 22:44:39 +00:00
Brian Carlstrom
3ba88e7d2d am b7fe2e62: am f7683b81: Merge "Clearly explain that 32-bit x86 is not supported"
* commit 'b7fe2e622d7a6a696749d5441358b84569de6f75':
  Clearly explain that 32-bit x86 is not supported
2015-03-20 22:09:36 +00:00
Brian Carlstrom
2cd8a74b2d Clearly explain that 32-bit x86 is not supported
Change-Id: I7f352fae8fa3742c61dc74e20aacd32254451bce
2015-03-20 12:50:42 -07:00
Ying Wang
d4ca3b38d9 am 4cbc4b39: am ae61f50a: Support to configure and build multiple custom images.
* commit '4cbc4b392da57c34626af38a4ea0fe4dc115af57':
  Support to configure and build multiple custom images.
2015-03-14 00:31:44 +00:00
Ying Wang
ae61f50a68 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
2015-03-14 00:06:54 +00:00
Ying Wang
14cc23d433 Remove support of factory ramdisk/bundle.
Bug: 18779515
Change-Id: Ia6d51d43965447e2e95944a7d2b4b41adb121cb7
2015-02-04 11:00:01 -08:00
Ying Wang
38074e8eb0 am 80ff45ba: am 0850330c: Merge "Default host module to 64-bit except for SDK builds."
* commit '80ff45ba98922b56ca70cc39fdb530482d366684':
  Default host module to 64-bit except for SDK builds.
2014-09-02 23:28:51 +00:00
Ying Wang
7ba7d7f4f5 Default host module to 64-bit except for SDK builds.
Set "HOST_PREFER_32_BIT := true" only if "sdk" or "win_sdk" is among the
make command line goals, or it's a MinGW windows build, which only builds
host SDK tools.

Bug: 13751317
Change-Id: I8ec1a97a5d1af065a153b16523c2ee3434d0dd71
2014-09-02 16:04:31 -07:00
Ying Wang
f58dd4fd2a am 798c8430: am 3c6e4910: Merge "Fix HOST_LIBRARY_PATH."
* commit '798c8430d5d5389e15379d64119dfc75cfc61ff8':
  Fix HOST_LIBRARY_PATH.
2014-08-14 20:09:00 +00:00
Ying Wang
d481b112f2 Fix HOST_LIBRARY_PATH.
Since we switched to $(HOST_OUT)/lib64 for 64-bit libraries and
$(HOST_OUT)/lib for 32-bit libraries.

Change-Id: Ie43bc03c37e2ac8542412a7543a6af5d60c6f725
2014-08-14 11:03:56 -07:00
Ying Wang
5bac962903 Fix HOST_LIBRARY_PATH.
Since we switched to $(HOST_OUT)/lib64 for 64-bit libraries and
$(HOST_OUT)/lib for 32-bit libraries.

Change-Id: Ie43bc03c37e2ac8542412a7543a6af5d60c6f725
2014-08-14 12:48:25 -07:00
Ying Wang
5a5d443f15 am 8ac188ff: am 6dbbb159: Merge "Consistent use of USE_MINGW"
* commit '8ac188ff0e739ea75ea02166c54428245200f088':
  Consistent use of USE_MINGW
2014-08-08 03:26:07 +00:00
Ying Wang
594a10ae77 Consistent use of USE_MINGW
Change-Id: I05e212e5a99639d0196006b9c2ec35072c54f399
2014-08-07 20:08:04 -07:00
Ying Wang
6aef047362 Support to set up TARGET_COPY_OUT_VENDOR in board config.
We first define TARGET_COPY_OUT_VENDOR as a placeholder. In product
config makefiiles we actually get the placeholders in
PRODUCT_COPY_FILES. A device can set up TARGET_COPY_OUT_VENDOR in its
BoardConfig.mk. We substitute the placeholder with the real
TARGET_COPY_OUT_VENDOR value after loading the BoardConfig.mk.
With this change, we can support building vendor stuff to
system.img (the default) or a separate vendor.img.

Bug: 16515152
Change-Id: I5b601d7a8b34fe032a1bac02aa5c204a3765691d
2014-07-23 22:26:32 -07:00