Commit graph

247 commits

Author SHA1 Message Date
Dan Albert
990419604a Merge "Expose the minimum supported SDK version to make."
am: fd697f4256

Change-Id: I1a7e7657258e6adbad88f9e51684e8238ab4ed18
2017-08-18 02:44:37 +00:00
Dan Albert
f5415d7cc6 Expose the minimum supported SDK version to make.
Right now this is hard coded in two places (here and in
core/binary.mk). Keep it in one place so it's easier to change.

Test: make checkbuild
Bug: None
Change-Id: I2a2c784d4c667b326f871e6144db92753c16c85f
2017-08-17 16:54:03 -07:00
Colin Cross
07b79f21dd Merge changes Id9717132,I3e3b7251,I021c7971,I8a117a86,Ia5196f1f, ...
am: b8245ea839

Change-Id: I9cd28715891eb9bbd6e0d1a3e0a3e83da2d1d00f
2017-08-12 01:19:58 +00:00
Colin Cross
0f86d186b1 Allow AndroidMkData.Custom handlers to extend normal values
Pass accumulated AndroidMkData to AndroidMkData.Custom handlers
and expose WriteAndroidMkData so that Custom handlers can write
out the normal make variables and then add their own.

Test: No change to out/soong/Android-aosp_sailfish.mk
Change-Id: Id9717132bbd6c5cf3af8596f3eaa9bbb05d98e40
2017-08-11 15:24:11 -07:00
Colin Cross
a18e9cfa29 Remove error from AndroidMkDataProvider.AndroidMk
It's never anything except nil, and it unnecessarily complicates
the implementations.

Test: m -j checkbuild
Change-Id: I3e3b7251f32ffa84dbdfd0448faf248c306ca808
2017-08-11 15:24:11 -07:00
Colin Cross
91825d2279 Remove error from AndroidMkData.Custom
It's never anything except nil, and it unnecessarily complicates
the implementations.

Test: m -j checkbuild
Change-Id: I021c7971ede3e11bbe08cf1601f4690ed4d1a036
2017-08-11 15:24:11 -07:00
Colin Cross
27a4b05441 Remove error from AndroidMkData.Extra
It's never anything except nil, and it unnecessarily complicates
the implementations.

Test: m -j checkbuild
Change-Id: I8a117a86aa39aeb07d9d8d0686ef869c52784f19
2017-08-11 15:24:11 -07:00
Colin Cross
6416271a1f Bring java support closer to current version of make
Make the javac arguments match what is used by make, and export them
back to make.  A future change will switch make to use the the
exported ones.

This makes a dx.jar compiled with soong have identical class files
as one compiled with make.

Test: manual
Change-Id: Ia5196f1f42bc564e99de22e32e72fd2930e9fbae
2017-08-11 15:24:11 -07:00
Colin Cross
74d73e2bfb Rename java_prebuilt_library to java_import
And make it work like bazel's java_import, using a "jars" property
instead of "srcs", and allowing multiple jars to be listed.

Test: soong tests
Change-Id: Ida2ace6412bd77b4feb423646000a1401004e0ea
2017-08-11 15:24:11 -07:00
Colin Cross
7fcfcb180f Merge changes I047d103b,I35de5d93,I3327d275
am: ec0aca3a84

Change-Id: If2db96c28fe9276eacab1e39982546ce6eb39edf
2017-08-08 04:45:08 +00:00
Treehugger Robot
ec0aca3a84 Merge changes I047d103b,I35de5d93,I3327d275
* changes:
  Add prebuilts/misc to root.bp
  Export java modules to make
  Fix java prebuilts
2017-08-08 04:38:45 +00:00
Dan Albert
7e73d5f3c6 Adapt to PLATFORM_VERSION_FUTURE_CODENAMES.
am: 31384debd7

Change-Id: Ib27259053a381f98a73b4dbc0421efce3ef31516
2017-08-03 02:27:44 +00:00
Dan Albert
31384debd7 Adapt to PLATFORM_VERSION_FUTURE_CODENAMES.
Don't preserve the confusing names from make. Rename AllCodenames to
ActiveCodenames, add FutureCodenames, and add CombinedCodenames to
fetch the *real* AllCodenames.

To allow `introduced=P` in NDK library definitions, we need to know
that P exists. Use the combined list of current and future API
codenames generating stubs.

Test: make ndk
Test: check out/soong/api_levels.json
Bug: None
Change-Id: I435f9ce7446236edc268a84e33474044a55a6302
2017-08-02 17:14:10 -07:00
Dan Albert
35f9c2290d Merge changes from topic 'ndk-weak-stubs'
am: bbe3ff4c50

Change-Id: I00a2f6b59ee9e1dfa1f5dbf27e0dea332e686637
2017-08-01 23:19:34 +00:00
Treehugger Robot
bbe3ff4c50 Merge changes from topic 'ndk-weak-stubs'
* changes:
  Add NDK API codenames for old releases.
  Add support for weak symbols in the NDK stubs.
2017-08-01 23:11:12 +00:00
Colin Cross
5ea9bcc50b Fix java prebuilts
The java prebuilt tests weren't registering the prebuilts mutators,
which hid an issue where prebuilts modules weren't getting renamed
to avoid collisions with source modules of the same name, which
ended up causing the prebuilt module to try to add a dependency
on itself.

Test: java_test.go
Change-Id: I3327d27533591cb08a4b8b8b5e1668a6f72be8df
2017-07-31 23:50:01 -07:00
Junmo Park
30486cb174 Merge "Add support for Exynos-M1"
am: ed2c78ef4e

Change-Id: Icd449eec1dc95e456725e03e0663979c698c4a49
2017-08-01 01:07:07 +00:00
Treehugger Robot
ed2c78ef4e Merge "Add support for Exynos-M1" 2017-08-01 01:00:37 +00:00
Dan Albert
151027107d Add NDK API codenames for old releases.
Without these, we'd need to go rewrite all the stub templates to stop
using the codename and use the number instead whenever an API is
released.

Test: changed something in libc to use introduced=L, make ndk
Bug: None
Change-Id: I1b8703655664c567f8a5c36219e73f11ba27d99a
2017-07-28 12:31:28 -07:00
Josh Gao
eb08b587b1 Merge "Delete output files before copying to them."
am: 074a5d35bf

Change-Id: I37673bb2aae7076a18788b36a917625d95474302
2017-07-27 02:04:38 +00:00
Treehugger Robot
074a5d35bf Merge "Delete output files before copying to them." 2017-07-27 01:53:56 +00:00
Josh Gao
ae15271392 Delete output files before copying to them.
Avoid ETXTBSY when copying over a file that's being executed.

Test: manual
Test: m -j
Change-Id: I0427b5018e67e12f685bce95028831b5661eee2c
2017-07-26 15:38:40 -07:00
Dan Willemsen
a9d4cf2323 Use a unified ninja builddir
am: 05f17764c3

Change-Id: I61cc01591b05b476b7d1d5c495753edc7b5eb9aa
2017-07-25 12:50:49 +00:00
Dan Willemsen
05f17764c3 Use a unified ninja builddir
Instead of calling SetNinjaBuildDir, pass it to bootstrap.bash, so that
the bootstrap package can set it consistently during bootstrapping and
normal execution.

Bug: 63720725
Test: m -j nothing
Test: mkdir o; ../bootstrap.bash; ./soong
Change-Id: Ica88d2d5f1461b5be49bfe6316c6ec4ef4d89d49
2017-07-24 15:58:20 -07:00
Junmo Park
8ea4959279 Add support for Exynos-M1
Change-Id: Ie57507a5d0ea9101db603ff3538c51853083a314
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
2017-07-24 07:14:55 +09:00
Junmo Park
8e0416b422 Merge changes I646f303b,I294ca692
am: 99cd671ac3

Change-Id: I435d78bc24058cb84fc2dcc9e687e03967112b74
2017-07-22 02:13:40 +00:00
Treehugger Robot
99cd671ac3 Merge changes I646f303b,I294ca692
* changes:
  Add support for Exynos-M2.
  Override mcpu option of ToolingCFlags when mcpu is eyxnos-m2.
2017-07-22 02:08:18 +00:00
Junmo Park
d86c902470 Add support for Exynos-M2.
Change-Id: I646f303b460556a9b36a44574f25dd992d42906c
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
2017-07-22 09:16:31 +09:00
Colin Cross
2947e85c2c Add support for java_defaults modules
am: 89536d4948

Change-Id: Ie88290932bd250629cfb7a02193d127bf212990f
2017-07-20 07:59:53 +00:00
Colin Cross
89536d4948 Add support for java_defaults modules
Test: java_test.go
Change-Id: I6dba1671c7eb019183af94bb7b10810296740101
2017-07-20 05:47:27 +00:00
Colin Cross
b6b050c4cf Merge "Don't pass same argument twice for defaults modules initialization"
am: 25167cdc7a

Change-Id: I46a2d77a2bb5f6597cc98eaffaa3f2f59ce21209
2017-07-20 04:01:39 +00:00
Colin Cross
1f44a3aa4f Don't pass same argument twice for defaults modules initialization
InitDefaultsModule and InitDefaultableModule were requiring the
module to be passed in as an argument twice, once as a
android.Module and once as an android.DefaultableMOdule.  Use
a type assertion instead.

Test: builds
Change-Id: I57d721e68a4f016e02c17a678af5f2ba25a9a430
2017-07-19 23:14:36 +00:00
Dan Willemsen
737623108d Merge "Switch owner to *string to disable concat"
am: 1651953ca5

Change-Id: I020d7e1ed733ccfc3035aca98fda0417771ecfda
2017-07-19 04:33:38 +00:00
Dan Willemsen
efac4a87ee Switch owner to *string to disable concat
If owner is specified in a defaults module, we shouldn't concat that
with the owner specified in a module using that defaults module. A
string pointer will produce the correct behavior (overriding the default)

Bug: 37330627
Test: out/soong/Android-*.mk looks correct after this change
Change-Id: I64574e2ba81c11b042248d7a44702ec4534ee932
2017-07-18 19:42:09 -07:00
Ivan Lozano
9f32b6b23b Merge "Allow integer_overflow sanitizer path exclusion."
am: 335565d300

Change-Id: Id19a2328970b540fcbcddb9421a2973eada302a7
2017-07-19 01:14:29 +00:00
Ivan Lozano
5f59553bca Allow integer_overflow sanitizer path exclusion.
Add support for excluding paths from having integer_overflow applied to
them when using SANITIZE_TARGET=integer_overflow via an
INTEGER_OVERFLOW_EXCLUDE_PATHS make variable. This covers the soong side
of the change.

Bug: 30969751
Test: Build with SANITIZE_TARGET=integer_overflow
SANITIZE_TARGET_DIAG=integer_overflow
INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no
longer being applied to binaries in that path.

Change-Id: I298b772f5425da28dff1cf007825be19558db3a8
2017-07-18 13:38:20 -07:00
Colin Cross
daf9154992 Merge "Add integration testing infrastructure"
am: dddf50039a

Change-Id: I7e378c07ae859e45ad461545401f69fade6137f0
2017-07-18 00:07:20 +00:00
Colin Cross
cec8171420 Add integration testing infrastructure
Fix mutator registration for tests to allow different tests
in the same package to register different mutators.

Allow tests to track the resulting ModuleBuildParams objects
to use in assertions, and provide helpers for getting them.
For example:
    config := android.TestConfig(buildDir)
    ctx := android.NewTestContext()
    ctx.RegisterModuleType(...)
    ctx.MockFileSystem(...)
    ctx.ParseBlueprintsFile("Android.bp")
    ctx.PrepareBuildActions(config)
    ctx.Register()
    // Get the Inputs value passed to the javac rule for the foo module
    inputs := ctx.ModuleForTests("foo".Rule("javac").Inputs

Test: java_test.go
Change-Id: I10c82967f5f3586d2c176f169906b571ed82fc73
2017-07-14 14:19:51 -07:00
Jiyong Park
fc728d9598 add device_kernel_headers module for vendor-specific kernel headers
am: d773eb3e86

Change-Id: I5df3aded9d8ba25cde31eee61ca337eb74113ef4
2017-07-08 03:18:59 +00:00
Jiyong Park
d773eb3e86 add device_kernel_headers module for vendor-specific kernel headers
device_kernel_headers is a built-in heder-only lib that provides device-specific
kernel headers. The header path is configured via a new product variable
SystemIncludeDirs, which is currently the mirror of
TARGET_PROJECT_SYSTEM_INCLUDES in the make world.

Note: generic kernel headers (bionic/libc/kernel) have been added to the
include path by default. "device_kernel_headers" module is for device-specific
kernel headers such as /device/*/*/kernel-headers.

Note 2: this is opt-in for Android.bp modules (i.e. header_libs :
["device_kernel_headers"] required.) while it is always provided to
Android.mk modules.

Bug: 62939405
Test: choosecombo to aosp_sailfish (or any other Pixel/Nexus targets)
BOARD_VNDK_VERSION=current m -j gralloc.msm8996 (or any other vendor
libs using vendor-specific kernel headers)

Change-Id: I81c60abc13942c89fff723d1544b27a81b300db0
2017-07-08 09:29:04 +09:00
Ivan Lozano
1523dadc8b Add integer_overflow sanitization build option.
am: 0c3a1efae4

Change-Id: I5fcdec7b89b8104e532b945f30a966dc95c80518
2017-07-07 20:12:58 +00:00
Ivan Lozano
0c3a1efae4 Add integer_overflow sanitization build option.
Adds the SANITIZE_TARGET=integer_overflow build option to apply signed and
unsigned integer overflow sanitization globally. This implements the
Soong side of the build option.

An additional build option is provided to control whether or not to run
in diagnostics mode, controlled by SANITIZE_TARGET_DIAG. This works the
same way that SANITIZE_TARGET does and currently only supports
'integer_overflow' as an option.

A default sanitizer blacklist is added to avoid applying sanitization
to functions that are likely to exhibit benign overflows.

Bug: 30969751
Test: Building with and without the new flags, device boot-up, tested
various permutations of controlling the new flags from build files.

Change-Id: Ibc8a8615d3132f1a23faaf1cb4861f24c5ef734a
2017-07-07 09:52:23 -07:00
Dan Willemsen
b24b042eee Merge "Fix install location for vendor tests"
am: e9425b0277

Change-Id: Ia44a50350f0980cb1bec364088e53b6e0d39a388
2017-07-07 03:38:25 +00:00
Treehugger Robot
e9425b0277 Merge "Fix install location for vendor tests" 2017-07-07 03:30:13 +00:00
Dan Willemsen
00269f23ee Fix install location for vendor tests
These should be install in /data/nativetest* with the rest of the tests,
but had been moved to /vendor/nativetest* accidentally. Add some tests
so that this doesn't happen again.

Bug: 63393698
Test: m -j blueprint_tools
Test: compare out/soong/Android-aosp_arm64.mk
Test: compare out/soong/build.ninja
Change-Id: Id3b08a7e3908955df18a043a02ea576dc88086c3
2017-07-06 18:09:46 -07:00
Nan Zhang
9cfe44255b Merge "Fixed the unexpected scenario for "device_supported""
am: 195fb4183c

Change-Id: Ideac7ca40ce3e514e76356305ee456b7d8ad5447
2017-07-06 18:36:08 +00:00
Nan Zhang
1a0f09bc56 Fixed the unexpected scenario for "device_supported"
cc_defaults {
    name: boo,
    device_supported: false,
}

cc_library_static {
    name: foo,
    defaults: [boo],
}

Soong still tried to build foo_android_arm/arm64 device target which is not what we
expected.

Test: m -j checkbuild

Change-Id: I26a67c9ea024f5458f0818def0fa10cecc5fb7cf
2017-07-05 10:37:57 -07:00
Colin Cross
c59a0042a1 Refactor factories
am: 36242850fd

Change-Id: Ied58f93022523557a5d28edbcd79a76b8e2fb875
2017-06-30 22:54:46 +00:00
Colin Cross
36242850fd Refactor factories
Change module factories from returning a blueprint.Module and a list
of property structs to returning an android.Module, which holds the
list of property structs.

Test: build.ninja identical except for Factory: comment lines
Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
2017-06-30 21:08:36 +00:00
Colin Cross
7c9bfa1f00 Fix panic in builds with no device am: 20e1365e61
am: 414e59cb8b

Change-Id: Id56046edf8bdb5a674f2517d9aba8d8757a536fb
2017-06-23 20:33:07 +00:00