Commit Graph

266 Commits

Author SHA1 Message Date
Jooyung Han ac4cf06f1c Merge "respect "apex_name:" for "apex" module" am: 852116a061 am: a13f0727b9 am: d4b98c58ad
am: 0e429b76c5

Change-Id: Ibb99aa5f044f5688b37ab8c53b8921527b830d6b
2019-09-29 17:48:50 -07:00
Jooyung Han d15aa1f123 respect "apex_name:" for "apex" module
For now, apex_name is used only for flattened apex.
Even if apex_name is set, the activation point of unflattened is
determined by 'name' in apex_manifest.json.

This change make apex_name as priority.
If apex_name is set, then use this for apex name
- update name in apex_manifest.json to apex_name
- do not check if key filename matches (use apex_name as key name)

This can be useful if soong wants to rename apex module. Simply setting
apex_name has the same effect of renaming "activation point" of apex.

But: 139774701
Test: m (soong test)
Change-Id: I8ea3645e4aa8f317997bc1443ec308ed0595b1c2
2019-09-27 01:50:46 +09:00
Jooyung Han 43b06095dc Merge "fix: "no_apex" can be put in defaults" am: 5e493d5660 am: edcce88102 am: 3182fbea54
am: 069520e466

Change-Id: I18e141464352ea7239ed0f7f2a4e5ffb6d185d1b
2019-09-25 22:34:06 -07:00
Jooyung Han 5e493d5660 Merge "fix: "no_apex" can be put in defaults" 2019-09-26 01:07:21 +00:00
Przemyslaw Szczepaniak 598898444f Remove libneuralnetworks from libbinder whitelist.
Test: build & flash crosshatch
Bug: 139282353
Change-Id: Iaf7904fdb306dd648430ce7e167977bd6508f146
Merged-In: Iaf7904fdb306dd648430ce7e167977bd6508f146
(cherry picked from commit 76b155448d)
2019-09-25 13:04:48 +01:00
Przemyslaw Szczepaniak 76b155448d Remove libneuralnetworks from libbinder whitelist.
Test: build & flash crosshatch
Bug: 139282353
Change-Id: Iaf7904fdb306dd648430ce7e167977bd6508f146
2019-09-25 08:24:18 +00:00
Jooyung Han cc372c5b1d fix: "no_apex" can be put in defaults
Currently, putting no_apex in defaults module doesn't work.

To fix this,
* 'no_apex' property is added as 'defaultable'.
* apex module doesn't follow beyond 'defaults' module.

Bug: 141560644
Test: m (soong tests added)
Change-Id: I8410785f7f83d843689a33b1241d74086c6a7671
2019-09-25 15:27:47 +09:00
Sundong Ahn f64320c3c3 Merge "Add isFlattenedVariant function" am: d9271cd823 am: e77be60bdc am: 7dca301944
am: 2e189f5960

Change-Id: Ia079914558cce626c0bf9c1aca543bba3bc2763d
2019-09-23 07:52:26 -07:00
Sundong Ahn e8fb724689 Add isFlattenedVariant function
The return value is true if TARGET_FLATTEN_APEX is true,
TARGET_BUILD_APPS is false and the module is flatten variant.
Only the module name of flattened variant is appended with
".flattened" as suffix.

Test: m -j
Bug: 139716748
Change-Id: I966a178b43c5d08bd69d19e97e59456aa66d9d28
2019-09-23 14:40:21 +09:00
Jiyong Park 3f5c6cfa89 Merge "Introduce module type 'sdk'" am: b1102ba828 am: 303b2992af am: d284cd8894
am: 5b3a626407

Change-Id: Ic4a173e9db31a2cb0d744e193d4515c5ca3949b2
2019-09-22 22:23:15 -07:00
Treehugger Robot b1102ba828 Merge "Introduce module type 'sdk'" 2019-09-23 04:38:24 +00:00
Jiyong Park d1063c1586 Introduce module type 'sdk'
This change introduces a new module type named 'sdk'. It is a logical
group of prebuilt modules that together provide a context (e.g. APIs)
in which Mainline modules (such as APEXes) are built.

A prebuilt module (e.g. java_import) can join an sdk by adding it to the
sdk module as shown below:

sdk {
    name: "mysdk#20",
    java_libs: ["myjavalib_mysdk_20"],
}

java_import {
    name: "myjavalib_mysdk_20",
    srcs: ["myjavalib-v20.jar"],
    sdk_member_name: "myjavalib",
}

sdk {
    name: "mysdk#21",
    java_libs: ["myjavalib_mysdk_21"],
}

java_import {
    name: "myjavalib_mysdk_21",
    srcs: ["myjavalib-v21.jar"],
    sdk_member_name: "myjavalib",
}

java_library {
    name: "myjavalib",
    srcs: ["**/*/*.java"],
}

An APEX can specify the SDK(s) that it wants to build with via the new
'uses_sdks' property.

apex {
    name: "myapex",
    java_libs: ["libX", "libY"],
    uses_sdks: ["mysdk#20"],
}

With this, libX, libY, and their transitive dependencies are all built
with the version 20 of myjavalib (the first java_import module) instead
of the other one (which is for version 21) and java_library having the
same name (which is for ToT).

Bug: 138182343
Test: m (sdk_test.go added)
Change-Id: I7e14c524a7d6a0d9f575fb20822080f39818c01e
2019-09-22 08:21:27 +09:00
Roland Levillain ad86f9cda8 Merge "Fix documentation of field `soong.apex.apexBundleProperties.Apex_name`." am: 50aee7c375 am: 9d380cbcc6 am: 76d6c2ce22
am: be7eb30016

Change-Id: I746c6b5723ea5937d0feee6a10b147226e7d8368
2019-09-20 08:33:59 -07:00
Roland Levillain 411c584cba Fix documentation of field `soong.apex.apexBundleProperties.Apex_name`.
Remove the mention to the (APEX) manifest (`apex_manifest.json`) from
this field's documentation, as `Apex_name` is neither read from nor
written to that file.

Test: n/a
Change-Id: Ia0dfac4f35f1ea697f379bcb19dd11af8705a0a0
2019-09-19 16:54:07 +01:00
Inseob Kim 6f05ee90b4 Merge "Add version to vendor variants" am: 362e9ce427 am: befa10bc9e am: cb8665e67d
am: 93442a6297

Change-Id: I984c06aecf29dda86971e3703217ebb35f6cd79a
2019-09-18 16:57:33 -07:00
Colin Cross 6ea023e579 Merge "Revert "Remove old-style support for translated second architectures"" am: 4c5032bb66 am: 39293b4068 am: 2cc88baaa0
am: 4a017dffb5

Change-Id: Ib1c16811731313086bc452341e380e269a9162e8
2019-09-18 14:44:05 -07:00
Colin Cross b88fe4be9b Merge "Remove old-style support for translated second architectures" am: da62bf96ce am: 94bac35d78 am: b60d2c245a
am: f757e18734

Change-Id: I034da2151297d396b6cb0c19b7fe4a1b17768c04
2019-09-18 14:19:19 -07:00
Colin Cross 402be41aa8 Revert "Remove old-style support for translated second architectures"
This reverts commit fe6330c7d2.

Reason for revert: this was accidentally propping up NDK builds
Bug: 141242600
Change-Id: Ie9f8e31479a74e8e9e14d720a5936da6b1d5d113
2019-09-18 21:12:31 +00:00
Colin Cross fe6330c7d2 Remove old-style support for translated second architectures
Translated second architectures now go in NativeBridgeArch instead
of DeviceSecondaryArch.

Bug: 141242600
Test: m checkbuild
Change-Id: I568046330abc002d4eed582cb999b62a5eaba790
2019-09-18 16:23:18 +00:00
Inseob Kim 64c4395386 Add version to vendor variants
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:

vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules

This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.

Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
2019-09-18 10:53:30 +09:00
Jooyung Han 333d0f72d6 Merge "Add "apex_vndk" module type" am: 1f6c94a3ac am: 87f0f3781c am: 49fb19f803
am: 834e9c7904

Change-Id: I2f4dfebe0d821b07633e296b6af16f43bd8de8b0
2019-09-17 10:48:19 -07:00
Treehugger Robot 1f6c94a3ac Merge "Add "apex_vndk" module type" 2019-09-17 17:14:48 +00:00
Sundong Ahn 85d35d37d3 Merge "Fix the construction of ziptype APEX" am: 999b5feab3 am: 081b05f0c0 am: 9e092e4eee
am: 27754975bf

Change-Id: If5153fe21a328ae19d72749a1a62ffbcfdd78a75
2019-09-16 22:04:03 -07:00
Sundong Ahn 72f1f3ec22 Fix the construction of ziptype APEX
If payload type of APEX is zip, flattened variant and non-flattened
variant create the same MK rules (it's build error). So only
non-flattened variant case, MK rule is created.
And if a.flattenedConfigValue is true, soong don't mutate variants. So
when a.flattenedConfigValue is true, MK rule should be created.

This CL is a partial revert of 4c04713871

Bug: 139716748
Test: m -j com.android.art.host
Change-Id: I37b2fa17e203fb668a0255cda37f10fcfadb3f85
2019-09-16 12:46:58 +09:00
Jaewoong Jung 096c323f65 Merge "Add NOTICE file path to apex bundle base rule." 2019-09-12 19:29:37 +00:00
Martin Stjernholm f1591e38f0 Merge "Treat libclang_rt.hwasan-* the same way as the other Bionic bootstrap libs." am: 931849f36f am: 5bdc6b0f22 am: ba2b1b02e3
am: 9f30d05a37

Change-Id: I568b301ef4f0abef688268e5d2a3f831c74165c0
2019-09-12 11:27:36 -07:00
Martin Stjernholm ba2b1b02e3 Merge "Treat libclang_rt.hwasan-* the same way as the other Bionic bootstrap libs." am: 931849f36f
am: 5bdc6b0f22

Change-Id: I9acceb1334aaec1fdc3fd7ec8b5b58bad185270a
2019-09-12 11:11:26 -07:00
Martin Stjernholm 931849f36f Merge "Treat libclang_rt.hwasan-* the same way as the other Bionic bootstrap libs." 2019-09-12 17:55:55 +00:00
Jaewoong Jung 8fb69efe94 Merge "Revert "Revert "Add NOTICE file path to apex bundle base rule.""" 2019-09-12 17:29:04 +00:00
Jaewoong Jung b00c1fb224 Add NOTICE file path to apex bundle base rule.
The NOTICE files are missing from prebuilt apexes, and it turns out they
were excluded when building bundles.

Bug: 140317706
Test: Ran build_mainline_modules.sh and checked bundle base modules.
Change-Id: I92c4231f2007e1d8cd9c2bd044201458803c0fd7
Merged-In: I92c4231f2007e1d8cd9c2bd044201458803c0fd7
2019-09-11 17:40:59 -07:00
Lokesh Gidra 6bb1822ab3 Merge "Fix the construction of host APEX (`.zipapex`) packages." am: 33ba06ccad am: e217f1a908 am: 7adfb31cc8
am: df71d20c2a

Change-Id: I378c5da8f8e47e56f63daa3c3b0258aa0f83d804
2019-09-11 17:28:50 -07:00
Lokesh Gidra 7adfb31cc8 Merge "Fix the construction of host APEX (`.zipapex`) packages." am: 33ba06ccad
am: e217f1a908

Change-Id: Iecdc5ca0705575029a70fa1d814205a4d87b0d6d
2019-09-11 17:10:24 -07:00
Jaewoong Jung 8756944374 Revert "Revert "Add NOTICE file path to apex bundle base rule.""
This reverts commit 8029d6a305.

Reason for revert: The bundletool change has been merged to master.

Change-Id: I87d87827f634a46153ab8ec812f11bc8aaa65c69
2019-09-11 21:41:31 +00:00
Sundong Ahn fe44ad9124 Merge "Create flattened variants for soong apex module" am: 84bd071cac am: 3ed605722a am: 6f2c800f48
am: bb4521c0d0

Change-Id: Id40f40c2d37e35b0483c461a187f476690088db9
2019-09-11 11:40:56 -07:00
Logan Chien 2bedcfcca5 Merge "apex: Install nativeTest with soong_cc_prebuilt.mk" am: 4b9f4d6ea0 am: 0a7b3e2383 am: a114787561
am: a7b1a29652

Change-Id: I8e60bf109c7b88f662cee5a2ec3ae04a1b7e5e09
2019-09-11 11:39:53 -07:00
Roland Levillain 4c04713871 Fix the construction of host APEX (`.zipapex`) packages.
Test: m com.android.art.host
Bug: 139716748
Change-Id: I3d3783bcb016475ccf658872b4cb31d1a8d7a59e
2019-09-11 14:25:06 +01:00
Martin Stjernholm 279de572d7 Treat libclang_rt.hwasan-* the same way as the other Bionic bootstrap libs.
Ensure that it ends up in the bionic/ subdir in the Runtime APEX and is
symlinked from /system/lib(64). That makes it available in the default
(platform) linker namespace and no longer requires it to be accessible
through the runtime namespace. All this makes it consistent with how the
other Bionic libs are handled, and avoids the need for various special
cases in ld.config.txt files (to be cleaned up later).

With this there might no longer be a need for a linker namespace for the
Runtime APEX, and we could consider removing the kludge with the
/apex/com.android.runtime/${LIB}/bionic subdirectories and the special case
in getCopyManifestForNativeLibrary in apex.go. However, keeping it calls out
the special treatment of those libraries, and allows a namespace to be added
again if necessary.

Test: Build and boot on taimen_hwasan-userdebug
Test: adb shell /apex/com.android.art/bin/dexdump on taimen_hwasan-userdebug
Test: atest CtsCompilationTestCases on taimen_hwasan-userdebug
Bug: 140734238
Bug: 140790209
Change-Id: Ieb506bfa5d5c159db391273c7eba41d7909de286
2019-09-11 12:16:31 +01:00
Sundong Ahn 6f2c800f48 Merge "Create flattened variants for soong apex module" am: 84bd071cac
am: 3ed605722a

Change-Id: Ic13530ca3f2864773a128f6993672e65d2b14557
2019-09-10 22:34:16 -07:00
Treehugger Robot 84bd071cac Merge "Create flattened variants for soong apex module" 2019-09-11 05:18:34 +00:00
Logan Chien a114787561 Merge "apex: Install nativeTest with soong_cc_prebuilt.mk" am: 4b9f4d6ea0
am: 0a7b3e2383

Change-Id: I37abfe1184e4c7b281d420eb45ca7da7e7d49c8b
2019-09-10 19:47:32 -07:00
Sundong Ahn e9b5572cbf Create flattened variants for soong apex module
The apexBundle module is mutated flattened variant and unflattened
variant. So we can install flattened apex and unflattened apex at the
same time with adding {Apex module name}.flattened to PRODUCT_PACKAGES.

Bug: 139716748
Test: m -j && Add com.android.art.debug.flattened to PRODUCT PACAGES and
check system/apex/com.android.art.debug directory

Change-Id: I0d8c9a155e47c5d0ff13e2f55d4080d91ef5093d
2019-09-11 10:47:12 +09:00
Logan Chien 0342c58262 apex: Install nativeTest with soong_cc_prebuilt.mk
This commit switches the build rule for APEX nativeTests from
`$(BUILD_PREBUILT)` to `soong_cc_prebuilt.mk`.  Since these are not real
prebuilts, `soong_cc_prebuilt.mk` should be sufficient.

Using `soong_cc_prebuilt.mk` also fixes a problem reported by prebuilt
ELF checker because `LOCAL_SHARED_LIBRARIES` are not generated for
nativeTests.

Bug: 139525855
Test: lunch aosp_walleye-userdebug && make check-elf-files
Change-Id: I7bfc29f9c2708896dad4e7cfc214480e1205a51e
2019-09-10 09:59:18 -07:00
Jooyung Han 344d5439c1 Add "apex_vndk" module type
"apex_vndk" is a variant of "apex" module.

apex_vndk {
  name: "com.android.vndk",
  ..
}

This rule is used to produce a VNDK APEX per vndk version.
It supports automatic inclusion of vndk libs.

If "vndk_version" property is set, the prebuilt vndk libs of
the version will be included in the apex bundle.

apex_vndk {
  name: "com.android.vndk.v29"
  vndk_version: "29",
  ...
}

Otherwise, platform's vndk version is used.

This will replace /system/{lib}/vndk-{ver} and vndk-sp-{ver}.

Bug: 134357236
Bug: 139772411
Test: m com.android.vndk
Change-Id: Ib5c86e625839389670d13c683a7427198ef6852f
2019-09-10 11:22:59 +09:00
Anton Hansson 8029d6a305 Revert "Add NOTICE file path to apex bundle base rule."
This reverts commit 105e166581.

Reason for revert: b/140600411

Change-Id: I8107cf2a0dd11d57a64e4ffddede5b2c0861684d
2019-09-06 08:46:30 +00:00
Sundong Ahn 8e5935bcf9 Merge "Support including apk inside an apex" am: 5afe2d6869 am: b8e2420c96 am: a9aa7e3528 am: babf73b100
am: 46abbbc61b

Change-Id: Ibd49dda3d5c3c6772d1817a3bdd24140f6c15926
2019-09-05 17:33:04 -07:00
Sundong Ahn a9aa7e3528 Merge "Support including apk inside an apex" am: 5afe2d6869
am: b8e2420c96

Change-Id: I8cea3d0ec244ddaa35a443fd1f46943f4b607d15
2019-09-05 17:08:43 -07:00
Treehugger Robot 5afe2d6869 Merge "Support including apk inside an apex" 2019-09-05 23:43:33 +00:00
Jaewoong Jung 0947306854 Add NOTICE file path to apex bundle base rule. am: 105e166581 am: 8f6b0708b6 am: 1a56f26ad3
am: ce3a9a539e

Change-Id: I8ab3185b8e4687b83d3782d7a950bf82fc6765ac
2019-09-05 16:27:21 -07:00
Jaewoong Jung 1a56f26ad3 Add NOTICE file path to apex bundle base rule. am: 105e166581
am: 8f6b0708b6

Change-Id: I1698c2b10e39517c5ee0b1e79e91e5c409760835
2019-09-05 16:09:55 -07:00
Jaewoong Jung f785123e35 Add NOTICE file path to apex bundle base rule.
am: 105e166581

Change-Id: Ia13df90ef43c2ee7a4df68424612c3b86d7e023f
2019-09-05 15:59:52 -07:00