Commit Graph

4777 Commits

Author SHA1 Message Date
Jiyong Park 2a45412445 LLNDK can re-export headers
Added export_llndk_headers properties to llndk_library module. And a new
module type llndk_headers is added. This is to enable an LLNDK library
to reexport other LLNDK headers.

Bug: 65395259
Test: do the following
// frameworks/native/libs/arect/Android.bp
llndk_headers {
    name: "libarect_vendor_headers",
    export_include_dirs: ["include"],
}

// frameworks/native/libs/nativewindow/Android.bp
llndk_library {
    name: "libnativewindow",
    ....
    export_llndk_headers: ["libarect_vendor_headers"],
}

check that
-Iframeworks/native/libs/arect/include is in LOCAL_EXPORT_CFLAGS of
libnativewindow.vendor in out/soong/Android-<product>.mk

Change-Id: If1650414b2967f2042f4ebe2b593ed3f3ea45d3a
2017-10-25 10:30:05 +09:00
Colin Cross 88c37d3c5f Add convenience phony targets for system modules
OpenJDK9 system modules are not build modules, which means they
can't be built with m core-system-modules.  Add a phony target.

Test: m core-system-modules
Change-Id: If6d512ff7a009b49743fb25cbb566935ec1c0153
2017-10-24 16:02:53 -07:00
Colin Cross 5c6ecc179f Don't panic in turbine with no classes
ALLOW_MISSING_DEPENDENCIES=true can cause missing dependencies to be
hidden from GenerateAndroidBuildActions, which is triggering the
len(jars) == 0 check in compileJavaHeader.  For the
ALLOW_MISSING_DEPENDENCIES=true case the check is unnecessary, as the
build rules will be replaced with runtime errors.  On the off chance
the check would have been hit in a real build, allow merge_zips to
create an empty zip file if it is asked to.

Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I3171f921d51229ddf38a1a647d32566658c673fa
2017-10-24 16:01:44 -07:00
Treehugger Robot 17ae970a92 Merge changes Id806633d,I05e945f3,Ieac84040,I18eb8cc0,If11c298e
* changes:
  Fix missing source module with ALLOW_MISSING_DEPENDENCIES=true
  Convert Visit*Deps from blueprint.Module to android.Module
  Move first/last unique elements utility functions to android package
  Move ModuleContext.ModuleBuild to ModuleContext.Build
  Make android.ModuleContext not include blueprint.ModuleContext
2017-10-24 21:16:43 +00:00
Colin Cross 0617bb85c6 Fix missing source module with ALLOW_MISSING_DEPENDENCIES=true
A module referenced with srcs: ":module" was not honoring
ALLOW_MISSING_DEPENDENCIES=true.  Don't fail if the module
doesn't exist, an error will already have been produced by
ExtractSourcesDeps.

Bug: 68183622
Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: Id806633d12ab2ecd78b532e1922e59824e5c20a8
2017-10-24 13:05:06 -07:00
Colin Cross d11fcda940 Convert Visit*Deps from blueprint.Module to android.Module
Also adds checks that the dependencies are android.Modules and
are not disabled.

Test: m checkbuild
Change-Id: I05e945f38915d49cd3c0ab72a86576949bc7eff2
2017-10-24 13:01:03 -07:00
Treehugger Robot 3615dcb30c Merge "Use prebuilt dx for PDK builds" 2017-10-24 19:17:49 +00:00
Colin Cross b671544973 Move first/last unique elements utility functions to android package
Move firstUniqueElements to android.FirstUniqueStrings,
lastUniqueElements to android.LastUniqueStrings, and lastUniquePaths
to android.LastUniquePaths.

Test: m checkbuild
Change-Id: Ieac840405126c7f8f98afb4a4ef35c01a18fe7fb
2017-10-24 12:12:32 -07:00
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