Commit graph

5543 commits

Author SHA1 Message Date
Justin Yun
7154928c93 Install VNDK snapshot libraries for system build
When BOARD_VNDK_VERSION := <VNDK version>, or
PRODUCT_EXTRA_VNDK_VERSIONS includes the needed <VNDK version> list,
the prebuilt VNDK libs in prebuilts/vndk/ directory will be
installed.

Each prebuilt VNDK module uses "vndk_prebuilt_shared" for shared
VNDK/VNDK-SP libs.

Following is the sample configuration of a vndk snapshot module:
vndk_prebuilt_shared {
    name: "libfoo",
    version: "27",
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    arch: {
        arm64: {
            srcs: ["arm/lib64/libfoo.so"],
        },
        arm: {
            srcs: ["arm/lib/libfoo.so"],
        },
    },
}

The Android.bp for the snapshot modules will be auto-generated by a
script.

Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: set BOARD_VNDK_VERSION := 27
      copy a snapshot for v27
      build with make command

Change-Id: Ib93107530dbabb4a24583f4d6e4f0c513c9adfec
2017-12-05 10:19:43 +09:00
Treehugger Robot
5760c9a12c Merge "No need to dump modules added -Werror." 2017-12-05 01:09:33 +00:00
Dan Willemsen
3fd18650fb Make setup_go_workspace_for_soong work on Mac
am: 932ecc1a97

Change-Id: Ic981d1a982dadd4604797e470ea1bfe427987be7
2017-12-05 01:05:14 +00:00
Chih-Hung Hsieh
fa0e27a1f3 No need to dump modules added -Werror.
* This reduces size of output file wall_werror.txt.
* Stop collecting SOONG_MODULES_ADDED_WERROR.

Bug: 66996870
Test: normal build
Change-Id: Ic6d87f6ee2b36b90ad0de4ac4f6f176334aba55e
2017-12-04 15:30:26 -08:00
Dan Willemsen
932ecc1a97 Make setup_go_workspace_for_soong work on Mac
Test: build/soong/scripts/setup_go_workspace_for_soong.sh on Mac and Linux
Change-Id: Idfcad3ace6f3ff4b68a438b8f1e0d94ff35573e0
2017-12-04 14:58:00 -08:00
Colin Cross
c9a8134399 Fix builds outside of make
am: e15ddaf4ae

Change-Id: I2d313af3ec290d38b32361785b4a41d508e4aae4
2017-12-04 21:13:16 +00:00
Colin Cross
e15ddaf4ae Fix builds outside of make
Builds outside of make use custom config files that may not set
some variables, which is causing nil pointer derefernces.  Use
wrapper functions that check for nil for the new config
variables.

Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I0f837094532aeb2ecdbe401affa55a7535075bf6
2017-12-04 11:24:31 -08:00
Colin Cross
ad843bce95 Fix apps build
am: 42f3a76f00

Change-Id: I335bfc9b17f3564e1d4714706983406374994e7d
2017-12-03 02:13:20 +00:00
Colin Cross
42f3a76f00 Fix apps build
Fix two problems with Soong's aapt2 rules that occur when
TARGET_BUILD_APPS is set.  Fix escaping the values passed to
--min-sdk-version, they are sometimes P-$$(cat out/build_number.txt).
Also use the correct path to the aapt2 prebuilt.

Bug: 69917341
Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_APPS=Camera2
Change-Id: I8660a62c4a87a74e0ac1b9d03d67103af93a0cbe
2017-12-03 00:26:39 +00:00
Colin Cross
9d58bf0610 Use default app certificate from Make
am: 61ae0b7eed

Change-Id: I272e259e0988add4648cf43eb66c1fb159714081
2017-12-02 04:46:20 +00:00
Colin Cross
61ae0b7eed Use default app certificate from Make
Bug: 69917341
Test: m checkbuild
Test: framework-res.apk is identical after converting to Soong
Change-Id: I6980afd94ea130740da0defeea045eddc2fc6439
2017-12-02 01:26:50 +00:00
Jeff Gaston
36ae868271 Merge "sbox error message now lists the files that were created"
am: a1a966734c

Change-Id: I53a7fe66c3309e9c0a381442ac295b5ac09ed35a
2017-12-02 00:50:53 +00:00
Treehugger Robot
a1a966734c Merge "sbox error message now lists the files that were created" 2017-12-02 00:45:35 +00:00
Nan Zhang
ebb3872759 Merge "Revert "Revert "Change Python in Soong to support device side build."""
am: 57f1406acc

Change-Id: Ied62058570d90518b007957f07f0c8e6853a4a7f
2017-12-01 23:46:18 +00:00
Nan Zhang
57f1406acc Merge "Revert "Revert "Change Python in Soong to support device side build.""" 2017-12-01 23:42:39 +00:00
Colin Cross
77a57a97ac Sort compiled resources by output path
am: b69301ee96

Change-Id: Ib5649aa675cdd90b10650a5811e1ee383322052c
2017-12-01 22:12:38 +00:00
Colin Cross
4713d17c35 Add enforced RRO support to Soong
am: 890ff551f7

Change-Id: Iabde599deb849c8252b65d7e5f9e2438fddb31f0
2017-12-01 22:11:21 +00:00
Jeff Gaston
90cfb09214 sbox error message now lists the files that were created
which should make debugging faster.

Bug: 66921582

Test: ./out/soong/host/linux-x86/bin/sbox --output-root outs --sandbox-path out/.temp/sbox-work -c "cd __SBOX_OUT_DIR__ && mkdir asubdir && mkdir b && touch asubdir/child a b c d e f g h i j k l m n o p" outs/a outs/b outs/z # and observe the below output:

mismatch between declared and actual outputs
in sbox command(cd out/.temp/sbox-work/sbox343858828 && mkdir asubdir && mkdir b && touch asubdir/child a b c d e f g h i j k l m n o p)

  in sandbox out/.temp/sbox-work/sbox343858828,
  failed to create 2 files:
    b: not a file
    z: does not exist
  did create 16 files:
    a
    asubdir/child
    c
    d
    e
    f
    g
    h
    i
    j
    ...6 more

Change-Id: I75e37834c44d4279dec874701d67ce8bb01b872c
2017-12-01 13:21:35 -08:00
Nan Zhang
d9ec5e7dea Revert "Revert "Change Python in Soong to support device side build.""
This reverts commit 0a32e5936b.

Reason for revert: <libsqlite was missing for darwin_x86_64 before>

Change-Id: I2e13e849a503a705ffad425df292380f2f73954e
2017-12-01 20:00:31 +00:00
Colin Cross
b69301ee96 Sort compiled resources by output path
Soong was keeping the compiled resources in the same order as the
input resources, which are sorted lexicographically. Converting the
path names in pathsToAapt2Paths results in a list that is no longer
lexicographically sorted.

Make sorts the inputs to aapt2 link by compiled resource name, so
do the same in Soong.

Bug: 69917341
Test: no change to framework-res.apk when converting to Soong
Change-Id: I29e8339b9969b0d323d469dac140c7e172b7ebfa
2017-12-01 19:16:42 +00:00
Colin Cross
b76a63e054 Split up testJavaWithEnvFs
am: 527012af07

Change-Id: I62d073c9c3810865bc1a24f142319180ae85a96d
2017-12-01 16:32:29 +00:00
Colin Cross
890ff551f7 Add enforced RRO support to Soong
Ignore overlay directories that have been selected for enforced RRO
by the product, and pass them to Make instead to be converted to
an auto generated RRO package.

Bug: 69917341
Test: m checkbuild
Change-Id: I8e2677f4c600acdd8dee0869bf4fbc3d5dbc8b44
2017-12-01 16:12:51 +00:00
Colin Cross
527012af07 Split up testJavaWithEnvFs
Instead of passing all the options to testJavaWithEnvFs, split it
up into testConfig, testContext, and run.  Tests that don't need
any special options can continue to use testJava, more complicated
tests can call the three functions manually.  This gives more
flexibility in complicated tests for the next patch.

Test: soong java tests
Change-Id: Ifd5dcb40cf08e4cbf69bf8e02c5698adbfbcdcb3
2017-12-01 16:12:03 +00:00
Nan Zhang
6625526e85 Merge "Revert "Change Python in Soong to support device side build.""
am: 6ff00ed273

Change-Id: I36eb5ec0a903cd748647820a1d7fcaacffbc322e
2017-12-01 06:30:40 +00:00
Nan Zhang
6ff00ed273 Merge "Revert "Change Python in Soong to support device side build."" 2017-12-01 06:26:40 +00:00
Nan Zhang
0a32e5936b Revert "Change Python in Soong to support device side build."
This reverts commit 3bba05962d.

Reason for revert: <revert mac builds>

Change-Id: I25f1380573d69f7e111287624a2d4a3d95fdd86b
2017-12-01 06:19:27 +00:00
Sundong Ahn
ccb9e107a8 Merge "Add system_$(VER)"
am: 9c9540d008

Change-Id: I39e3a4ac7c47d918b52f0a4bd22a7c03009cf8a1
2017-12-01 04:25:34 +00:00
Treehugger Robot
9c9540d008 Merge "Add system_$(VER)" 2017-12-01 04:19:45 +00:00
Dan Willemsen
1ef719f19c Merge "Add base variables for windows clang"
am: d0704cf7fa

Change-Id: I37d1e0b151976f44d942a994b9335d6e75917362
2017-12-01 02:58:21 +00:00
Treehugger Robot
d0704cf7fa Merge "Add base variables for windows clang" 2017-12-01 02:52:27 +00:00
Nan Zhang
6a505f65ad Merge "Change Python in Soong to support device side build."
am: 6825c25d6e

Change-Id: I01adcfec4515cba43cd24cb96e6a3110250981b5
2017-12-01 02:28:21 +00:00
Treehugger Robot
6825c25d6e Merge "Change Python in Soong to support device side build." 2017-12-01 02:22:56 +00:00
Sundong Ahn
0926fae350 Add system_$(VER)
The system_$(VER) is added for vendor, similar to sdk.

Bug: 67724799
Test: build
Merged-In: I2545c92707591ca278066870c74e9f49e9825855
Change-Id: I2545c92707591ca278066870c74e9f49e9825855
(cherry picked from commit b8baff1fa3)
2017-12-01 00:41:59 +00:00
Dan Willemsen
01f388c343 Add base variables for windows clang
This just copies most of what exists for clang on Linux, but doesn't
actually turn on clang support.

Bug: 69933068
Test: m nothing; compare ninja files
Change-Id: I2cf203026e7ced32004a91d7f3baf4a6415085eb
2017-11-30 15:42:53 -08:00
Nan Zhang
3bba05962d Change Python in Soong to support device side build.
Add python_test to generate executables for both host and device side.
And change python_library_host to python_library.

installation for python device test will be under
target/product/generic_arm[64]/data/nativetest[64].

Bug: b/69114465
Test: m clean && m -j
Device Test:
adb root; adb push nan_devicetest /data;
adb shell; ./nan_devicetest
print(sys.path)
['/data/nan_devicetest/runfiles', '/data/nan_devicetest', '/data/nan_devicetest/internal', '/data/nan_devicetest/internal/stdlib']

Change-Id: If8317070a3aa1b6dab2e84b8df2d037f495d7247
2017-11-30 13:55:49 -08:00
Colin Cross
2fc6f692d1 Merge "Allow building framework.jar and framework-res.apk"
am: 85c87cef01

Change-Id: I9e461fe98f4609b0286747a9f87939af78a7039a
2017-11-30 20:42:27 +00:00
Colin Cross
85c87cef01 Merge "Allow building framework.jar and framework-res.apk" 2017-11-30 20:38:15 +00:00
Dan Willemsen
3f5e5a3714 Expose $(prefix)CLANG_SUPPORTED to make
am: 7b6d9b956d

Change-Id: I500e3d7aa8765a85c7edd2da320885a032f851c3
2017-11-30 08:11:19 +00:00
Dan Willemsen
7b6d9b956d Expose $(prefix)CLANG_SUPPORTED to make
So that we can switch clang on and off for windows from just Soong.

Bug: 69933068
Test: grep CLANG_SUPPORTED out/soong/make_vars-aosp_arm.mk
Change-Id: Ic304c1138ee2302c5733ef465bd462a0a25e949f
2017-11-30 05:08:32 +00:00
Colin Cross
5ab4e6d817 Allow building framework.jar and framework-res.apk
Update app support enough to build framework-res.apk, link
framework.jar against its generated files, and export it to
make.

Bug: 69917341
Test: m checkbuild tests docs
Change-Id: I7db29cd1f5fabb22e844483ecc7c38abfedbbe0a
2017-11-29 20:47:42 -08:00
Colin Cross
b3280409fd Merge changes Ic88be643,Ibe21efde
am: 46029a4131

Change-Id: I53d8eefa3f818ce1979f19fbe01f8523b045fb3c
2017-11-30 02:32:02 +00:00
Treehugger Robot
46029a4131 Merge changes Ic88be643,Ibe21efde
* changes:
  Replace ModuleContext.AConfig() with Config()
  Make *Context.Config return a Config instead of a interface{}
2017-11-30 02:21:30 +00:00
Chih-Hung Hsieh
9741b57ad8 Merge "Reduce WarningAllowedProjects."
am: c92168f08d

Change-Id: I9220f79e14be9a3445445e35d985c66ede128d87
2017-11-30 00:53:32 +00:00
Jeff Gaston
dd5e9980ce Revert "Soong support for namespaces"
am: 178d5fefc0

Change-Id: Ib1d57b0d7d9f914d24c3f6fbef91d8d02821b65f
2017-11-30 00:53:02 +00:00
Colin Cross
eb2f0d255e Convert a missed Singleton
am: 54855ddca4

Change-Id: I3dc101f9a5ffdfb1d0994ff0f4f3b08693cb8b17
2017-11-30 00:52:43 +00:00
Colin Cross
044c46b1d5 Fix aapt2
am: 44f066895d

Change-Id: I1aa3790a982d2ea64e66debf372096468236be63
2017-11-30 00:52:23 +00:00
Treehugger Robot
c92168f08d Merge "Reduce WarningAllowedProjects." 2017-11-30 00:44:57 +00:00
Colin Cross
6510f91a1c Replace ModuleContext.AConfig() with Config()
AConfig() now duplicates Config().  Replace the uses of AConfig()
with Config().  Leave AConfig() for now until code in other
projects is cleaned up.

Test: m checkbuild
Change-Id: Ic88be643049d21dba45dbd1a65588ed94bf43bdc
2017-11-30 00:44:18 +00:00
Colin Cross
aabf67968c Make *Context.Config return a Config instead of a interface{}
In Soong, a Config() method will always return a Config.  Make
ModuleContext, SingletonContext, TopDownMutatorContext and
BottomUpMutatorContext's Config() methods explictly return
a Config to avoid having to type-assert everywhere.  Overriding
the Config method requires duplicating the list of methods in
blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext,
following the same pattern used by the other *Contexts.

Config() obsoletes the AConfig() method used in some places, which
will be cleaned up in the next patch.

Test: m checkbuild
Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
2017-11-30 00:44:11 +00:00
Jeff Gaston
178d5fefc0 Revert "Soong support for namespaces"
This reverts commit 63a250a336.

Reason for revert: Some failures:
  namespace_test.go:648: dir1/Blueprints:2:4: a namespace must be the first module in the file 
  such as New Build Breakage: aosp-master/build_test @ 4475274

Change-Id: I1b5db8eb934e51ff22241bfca44199d886b1393b
2017-11-30 00:43:43 +00:00