Commit graph

4769 commits

Author SHA1 Message Date
Colin Cross
ae88703df5 Move ModuleContext.ModuleBuild to ModuleContext.Build
Now that android.ModuleContext does not include blueprint.ModuleContext
we can rename android.ModuleContext.ModuleBuild to
android.ModuleContext.Build without colliding with
blueprint.ModuleContext.Build.  Leave ModuleBuild as a wrapper around
Build for now to avoid having to update all the users outside
build/soong simultaneously.

Test: m checkbuild
Change-Id: I18eb8cc04faf002049a11d9aac97e9732ff5d638
2017-10-24 10:59:00 -07:00
Colin Cross
3f68a1362b Make android.ModuleContext not include blueprint.ModuleContext
android.ModuleContext should replace the blueprint.ModuleContext
methods with ones that take android.Module parameters instead of
blueprint.Module parameters.  As a first step, don't include
blueprint.ModuleContext in android.ModuleContext and manually
specify the methods from blueprint.ModuleContext that we need.
Future patches will replace these methods with ones that take
android.* types.  Also do the same for TopDownMutatorContext.

Test: m checkbuild
Change-Id: If11c298eed98bc65712b4942d0283cafa058726c
2017-10-24 10:58:59 -07:00
Colin Cross
0d3f8c0db6 Use prebuilt dx for PDK builds
The source for dx may not be available in PDK builds, use the
prebuilt one from prebuilts/build-tools instead.

Bug: 67663308
Test: m TARGET_BUILD_PDK=true
Change-Id: I9090b5190539f901fc05264a472133c12d4ea2a1
2017-10-24 10:52:26 -07:00
Colin Cross
d602bc1cda Fail when a module depends on a disabled module
am: 1e45cb77a0

Change-Id: I454b353606584838764ebc4d83d6568286b65bcc
2017-10-24 01:28:59 +00:00
Colin Cross
1e45cb77a0 Fail when a module depends on a disabled module
Copy the logic from cc.go to fail when a module depends on a disabled
module.  A future change will refactor this to remove the duplication
and cover all other module types.

Test: m TARGET_BUILD_PDK=true doesn't panic
Bug: 67663308
Change-Id: Iab2b142cebdbd74df934e4733f0de83bd3334d86
2017-10-23 16:43:47 -07:00
Colin Cross
0c503f1e80 Merge changes from topic "soong_prebuilts_misc_common"
am: 254aaec328

Change-Id: I68c26fd073e1621a428e09c108dce5bd0a5f08ec
2017-10-23 21:16:59 +00:00
Colin Cross
d85ff2fa7a Support multiple outputs in genrules with depfile: true
am: 15e86d938b

Change-Id: If3c3ed7927ca8343077b9e053359a8f122cf7b86
2017-10-23 21:16:46 +00:00
Colin Cross
56ee7b6c44 Support installable prebuilt jars
am: 535e2cf4e1

Change-Id: Ibfe43dd69f27abc6a7a945f822f5f39a4638bf10
2017-10-23 21:16:33 +00:00
Treehugger Robot
254aaec328 Merge changes from topic "soong_prebuilts_misc_common"
* changes:
  Fix finding src directory for aidl
  Support multiple outputs in genrules with depfile: true
  Support installable prebuilt jars
2017-10-23 21:12:13 +00:00
Jiyong Park
f14986b8a6 Merge "Allow macro definition with space"
am: d8cc795f86

Change-Id: I7b95bcee363fcacccb090bb57e529709c8b7934f
2017-10-22 07:41:29 +00:00
Treehugger Robot
d8cc795f86 Merge "Allow macro definition with space" 2017-10-22 07:38:51 +00:00
Colin Cross
e243c231da Fix finding src directory for aidl
aidlFlags was always looking for a src directory at the top level
instead of in the module's source directory.

Test: m checkbuild
Change-Id: Ie31baa21c8632c2bd9a6ebc42e6291417b1f31cd
2017-10-21 15:19:43 -07:00
Colin Cross
24d1ed50ac Add $ORIGIN to rpath for host tests
am: bd75e1d0bd

Change-Id: I017e2a833c830eb3c57831fc4bf45a7aca09f88c
2017-10-21 17:51:06 +00:00
Colin Cross
bd75e1d0bd Add $ORIGIN to rpath for host tests
Allow loading test libraries installed into the test directory.

Test: builds
Change-Id: I15a462ebd41b99e9eb76b5be889ed3bd013732e0
2017-10-21 16:04:14 +00:00
Colin Cross
15e86d938b Support multiple outputs in genrules with depfile: true
Ninja doesn't support depfiles on a rule with multiple outputs.
Use a single output and put all the rest as implicit outputs.

Bug: 68057449
Test: java_test.go
Change-Id: Ia544493b1b3b51b185c865149d8f3e0eb3c57ee2
2017-10-20 20:44:50 -07:00
Colin Cross
730bb0113c Use prebuilts/sdk/*current until Soong can generate stubs
am: 2ebc476646

Change-Id: Ia32894aa7ac8a62ccef2aa0b5017114d403de622
2017-10-21 03:37:46 +00:00
Colin Cross
6c1b2c14f8 Add sdk_version property to imported jars
am: 461bd1aae7

Change-Id: I2782bf3ba9d412499124c371fb16e68fce212dbe
2017-10-21 03:37:43 +00:00
Colin Cross
535e2cf4e1 Support installable prebuilt jars
Some host modules need to be installed.  Add an installable property.

Test: m checkbuild
Change-Id: Ifd023213ff66e81aa77ba1741c75837a1dd88d1d
2017-10-20 20:14:47 -07:00
Colin Cross
2ebc476646 Use prebuilts/sdk/*current until Soong can generate stubs
The android_*stubs_current modules don't yet exist, so fall back to
the prebuilt jars for now.

Test: m checkbuild
Change-Id: Iabd32b30954b3f4a6d9a779fde52a032b684807e
2017-10-20 20:14:22 -07:00
Colin Cross
461bd1aae7 Add sdk_version property to imported jars
Test: m checkbuild
Change-Id: I83dd6ad157c7a5918747ce8c9be05c1e1e22d710
2017-10-20 20:14:22 -07:00
Nan Zhang
5aae858f1a Support Turbine in Soong.
am: ed19fc3e2c

Change-Id: Iea8d7acbda36a22bdc961417f84cd4db88249279
2017-10-21 01:28:49 +00:00
Nan Zhang
ed19fc3e2c Support Turbine in Soong.
If sdk jars(android_stubs_current, etc) are compiled using soong java
modules, we have to filter them when running Java build with Turbine.

TODO: provide more unit-tests.

Test: m clean && m -j32; go test java_test

Change-Id: Iad7c241b0e8b0ca760950733f513124b56c84564
2017-10-20 16:26:18 -07:00
Alan Leung
e71e037a04 Merge "Add D8 support"
am: 9e07394fd0

Change-Id: I4cfcabf3f281b3d24a14eeaff67d5713d97a017e
2017-10-20 19:04:50 +00:00
Alan Leung
9e07394fd0 Merge "Add D8 support" 2017-10-20 18:59:22 +00:00
Yabin Cui
3e6e44e0e3 Merge "Support tsan in Android.bp."
am: ef784b537e

Change-Id: I6d92281bf394416f33977cc004371594c9cf6e89
2017-10-20 18:04:34 +00:00
Yabin Cui
ef784b537e Merge "Support tsan in Android.bp." 2017-10-20 17:56:00 +00:00
Jiyong Park
34f79d0edd Merge "Add two more vendor-specific properties"
am: fa9ff8441a

Change-Id: Ifbd44067250d660957644937b61f30fef6a421cd
2017-10-20 01:10:32 +00:00
Treehugger Robot
fa9ff8441a Merge "Add two more vendor-specific properties" 2017-10-20 01:02:18 +00:00
Alan Leung
1d476fcbeb Add D8 support
Bug: 67754178
Test: m -j32 checkbuild && USE_D8=true m -j32 checkbuild

Change-Id: If63afc10ceb5e753bbb7f195bb8a895eaef10775
2017-10-19 16:27:42 -07:00
Colin Cross
481fe49254 Merge "Add property to prevent dex preopting"
am: 38cd9a4ec7

Change-Id: I646bb402a703e45206b9a8720285847571b16cc0
2017-10-19 23:16:30 +00:00
Colin Cross
8de6ca542e Merge changes If00e16bd,Id5b2ec3f
am: 16792167ad

Change-Id: Ibf9c879fc33ee0db6d0a754785ec84de522821c2
2017-10-19 23:16:10 +00:00
Jeff Gaston
a7c5d2fe8b Merge "Prevent androidmk crash on art/tools/ahat/Android.mk"
am: 5c617cc6d1

Change-Id: I0f9888b622c80183087972936476f9818198c2de
2017-10-19 23:15:40 +00:00
Colin Cross
38cd9a4ec7 Merge "Add property to prevent dex preopting" 2017-10-19 23:01:02 +00:00
Yabin Cui
6be405ef69 Support tsan in Android.bp.
Bug: http://b/25392375
Test: build a unit test with tsan.

Change-Id: Ifbd30e41e3a9558a8f106750c2a08778db5d5c81
2017-10-19 15:53:02 -07:00
Treehugger Robot
16792167ad Merge changes If00e16bd,Id5b2ec3f
* changes:
  Move all jar intermediates to subdirs
  Use full relative paths to get module outputs in tests
2017-10-19 22:37:26 +00:00
Treehugger Robot
5c617cc6d1 Merge "Prevent androidmk crash on art/tools/ahat/Android.mk" 2017-10-19 22:16:09 +00:00
Colin Cross
a22116e2d9 Add property to prevent dex preopting
Add dex_preopt property and pass it through to make as
LOCAL_DEX_PREOPT.

Test: m checkbuild
Change-Id: I6f19d097d1769068b7e4093f011574c540c137f3
2017-10-19 14:26:32 -07:00
Colin Cross
1ee2317555 Move all jar intermediates to subdirs
Make all the jar intermediates called modulename.jar, and put each
in a subdir for the tool that generated it.  This will simplify
using the jars as inputs to genrules and resources.

Test: java_test.go
Change-Id: If00e16bd7df5a4ba24ebc4b68c9ccf2cfda49544
2017-10-19 20:45:11 +00:00
Colin Cross
702e0f8ab0 Use full relative paths to get module outputs in tests
Make Rel() on ModuleOutPath and ModuleGenPath return the path
relative to the module out and module gen directories respectively,
and make TestingModule.Output() match against the full relative
path to the module.

Test: java_test.go still passes
Change-Id: Id5b2ec3fdef41d4169b943e68d032fc64a2b6f92
2017-10-19 20:44:11 +00:00
Jeff Gaston
af7d3ef81d Prevent androidmk crash on art/tools/ahat/Android.mk
Because a directive can exist within a rule's recipe,
there may not exist an ordering of nodes such that
nodes[i].End() <= nodes[i+1].Start()

This disables that assertion.

Test: androidmk art/tools/ahat/Android.mk
Bug: 67906386

Change-Id: I84ea6ebdbc01c1600b1fa188463aae56270f0135
2017-10-19 13:22:56 -07:00
Jeff Gaston
b0a5b0d331 split soong_zip into a library and a binary
am: 11b5c51d4e

Change-Id: Idfd3be84260cd6873a41acb5cbb61eea5a660566
2017-10-19 18:34:54 +00:00
Jeff Gaston
11b5c51d4e split soong_zip into a library and a binary
to make it faster/easier to invoke from other Go programs
(such as multiproduct_kati)

Bug: 67478260
Test: m -j
Change-Id: Idd2671a44290550197c88f53dd11a6dd39c85cc5
2017-10-19 18:18:04 +00:00
Jiyong Park
d08b697828 Allow macro definition with space
cflags: ["-DMACRO=\" definition \""] should not be rejected.

Bug: 66914194
Test: TestCompilerFlags in cc_test.go

Change-Id: I7f96505a83898616415ef1fb7e13596b56a063f3
2017-10-19 22:39:32 +09:00
Jiyong Park
52d25bd812 Add two more vendor-specific properties
target.vendor.exclude_static_libs: this is the static counterpart of
target.vendor.exclude_shared_libs. This removes the libs from the static
dependency when build the vendor variant.

target.vendor.version_script: vendor-specific version script.

Right now, these are required to merge libseliux_vendor into libselinux
and make it vendor_avaialble:true. libselinux is using libpackageparser
which is a platform-only library. The vendor variant of libselinux can't
depend on the library.

Bug: 66914194
Test: lunch aosp_arm64_ab-userdebug; m libselinux.vendor

Change-Id: I163e634f2f54d419f9471a585a3b04731b63f809
2017-10-19 17:30:48 +09:00
Dan Willemsen
a00e95595b Merge changes I670144f4,I7144cd42
am: e87ae20e25

Change-Id: I6bc0133d80f844c5b454f9e8ca8bb17c5f93b7a4
2017-10-18 23:55:46 +00:00
Treehugger Robot
e87ae20e25 Merge changes I670144f4,I7144cd42
* changes:
  Silence error during microfactory trace import
  Synchronize file rotation
2017-10-18 23:51:45 +00:00
Jeff Gaston
3e8af0143a Merge "Automatically reorder C/C++ link dependencies in Soong"
am: 92d3dadf3b

Change-Id: Iad48c4f94a4c15d1a2882f3219316065c55f63a1
2017-10-18 23:15:38 +00:00
Jeff Gaston
92d3dadf3b Merge "Automatically reorder C/C++ link dependencies in Soong" 2017-10-18 23:09:34 +00:00
Dan Willemsen
69b18ed167 Silence error during microfactory trace import
This may happen if there's been another call to microfactory before
we've read the log file. Just ignore the error and continue.

Test: Run `while true; do get_build_var TARGET_PRODUCT; done` in parallel
Change-Id: I670144f4637281ebf1299dbd9151dd9819c363e3
2017-10-18 15:09:16 -07:00
Dan Willemsen
ca8feb385c Synchronize file rotation
Create a lock file during log rotation so that multiple processes won't
step on each other.

Test: Run `while true; do get_build_var TARGET_PRODUCT; done` in parallel
Test: m blueprint_tools
Change-Id: I7144cd42aca47c694487ddae44713f82665ed81e
2017-10-18 15:09:08 -07:00