platform_build/core
Jiyong Park 4a693b28e6 jacoco-report-classes-all.jar doesn't depend on fake modules
The reason that the jar file depended on modules_to_install was to
collect files from other partitions, not just system. It isn't the
intention to gather fake modules like phony modules and more importantly
their dependencies (LOCAL_REQUIRE_MODULES). This change explicitly
filters out the fake modules to make the intent clearer.

In fact, the jar file depending on fake modules can have a side effect
that overridden modules are installed. It can happen as follows:

PRODUCT_PACKAGES += A B C

LOCAL_MODULE := A
LOCAL_REQUIRED_MODULES := B
include $(BUILD_PHONY_PACKAGE)

LOCAL_MODULE := B
include $(BUILD_XXX)
...

LOCAL_MODULE := C
LOCAL_OVERRIDES_MODULES := B
include $(BUILD_XXX)

modules_to_install is set to

out/target/product/xxx/fake_packages/A-timestamp
out/target/product/xxx/system/.../C

; B is correctly overridden.

But there still is an order-only dependency from A to B which is created
by add-all-target-to-target-required-modules-deps. Unfortunately,
overridden isn't take into account here.

So, if the jacoco jar file depends on modules_to_install, both B and C
are installed. And if the creation of system.img happens later, the two
are included together, which is an error.

A preferred way of fixing this is to amend
add-all-target-to-target-required-modules-deps so that override is take
into account. However, it will likely to require more Make tricks. This
change takes a much easier path; pruning the fake packages from the
dependencies so that its dependencies which might be wrong can't be
installed.

Bug: 175400393
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true
SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=cf_x86_phone
TARGET_BUILD_VARIANT=userdebug
TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 droid dist
DIST_DIR=out/dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*"
NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device"
continuous_instrumentation_tests continuous_native_tests device-tests
platform_tests
No com.android.art.apex in system.img

Change-Id: Ie8a917b7c3985c3a4f19372a4430accd84124e83
2021-01-13 22:12:52 +09:00
..
clang Remove unused mips workarounds. 2020-03-06 16:46:59 -08:00
combo Merge "Add new armv8-2a-dotprod arch variant support." 2020-09-21 17:54:04 +00:00
tasks Add unit_test option to module-info.json 2021-01-08 17:36:56 +08:00
aapt2.mk
aapt_flags.mk
allowed_ndk_types.mk
android_manifest.mk Introduce TARGET_BUILD_UNBUNDLED_IMAGE 2020-08-03 15:47:09 +09:00
android_soong_config_vars.mk Temporarily set default to keep building with ART sources. 2020-12-17 16:00:27 +00:00
app_certificate_validate.mk Use inclusive language in build/make 2020-06-12 21:10:55 -07:00
app_prebuilt_internal.mk Remove obsolete PDK build functionality 2020-08-11 01:12:01 +00:00
artifact_path_requirements.mk Add a "relaxed" mode for require-artifacts-in-path 2020-12-09 16:30:43 +00:00
autogen_test_config.mk AutoGen: Support NativeTest with vendor namespace. 2020-09-01 10:33:47 +08:00
base_rules.mk Add unit_test option to module-info.json 2021-01-08 17:36:56 +08:00
binary.mk Merge "Use the soong-built NDK CRT objects." 2020-08-12 22:01:27 +00:00
board_config.mk Add support for packing multiple vendor ramdisks in vendor_boot 2020-12-17 11:07:04 +08:00
build-system.html Document unbundle build behavior 2020-08-06 18:25:51 +09:00
build_id.mk Version bump to RQ1A.210105.003 [core/build_id.mk] 2020-12-01 23:58:02 +00:00
build_rro_package.mk Do not remove RRO resources 2020-01-14 17:00:13 -08:00
cc_prebuilt_internal.mk Dedup lists of NDK libraries from Soong. 2020-06-30 12:46:41 -07:00
ccache.mk
check_elf_file.mk Exclude system shared libs from fix suggestion 2020-09-22 18:55:11 +08:00
checktree
cleanbuild.mk
cleanspec.mk
clear_vars.mk Revert^2 "Add variables for notice deps, license kinds etc." 2021-01-06 20:46:49 -08:00
config.mk Revert^2 "Always turn on compatible property" 2020-11-19 09:48:49 +00:00
config_sanitizers.mk [config_sanitizers] Fail if LOCAL_SANITIZE_BLACKLIST is used. 2020-08-11 11:00:53 -07:00
configure_module_stem.mk
copy_headers.mk Stop removing valid copy headers 2019-12-26 16:52:34 -08:00
cxx_stl_setup.mk Update make build system for dynamic unwinder. 2020-01-10 11:09:52 -08:00
definitions.mk Revert^2 "Rough-in license metadata support to make." 2021-01-06 20:52:43 -08:00
deprecation.mk Obsolete unused module types 2020-04-18 21:00:18 -07:00
device.mk
dex_preopt.mk Auto-generate dexpreopt boot image module 2020-07-14 15:49:08 +08:00
dex_preopt_config.mk Initialize DEX_PREOPT_DEFAULT based on global dexpreopt settings. 2021-01-11 17:02:16 +00:00
dex_preopt_libart.mk Auto-generate dexpreopt boot image module 2020-07-14 15:49:08 +08:00
dex_preopt_odex_install.mk Rework class loader context implementation. 2020-11-03 11:23:42 +00:00
distdir.mk Remove obsolete PDK build functionality 2020-08-11 01:12:01 +00:00
dumpvar.mk Make dump-many-vars work for large variables 2020-11-07 01:38:20 +00:00
dynamic_binary.mk Give strip depfile a unique name, properly include it 2020-01-27 22:06:21 +00:00
empty_test_config.xml
envsetup.mk Merge "Revert "Add modules partition."" 2020-09-16 22:45:54 +00:00
executable.mk Remove TARGET_PREFER_32_BIT. 2020-06-08 16:36:52 -07:00
executable_internal.mk Use the soong-built NDK CRT objects. 2020-07-17 15:23:57 -07:00
executable_prefer_symlink.mk Remove TARGET_PREFER_32_BIT. 2020-06-08 16:36:52 -07:00
filter_symbols.sh
force_aapt2.mk
fuzz_test.mk
generate_enforce_rro.mk
goma.mk Disable goma for javac actions in Make 2020-03-05 20:46:47 +00:00
header_library.mk
header_library_internal.mk
host_dalvik_java_library.mk Use soong_zip instead of jar to generate .jar files in javac actions 2020-04-16 18:23:32 -07:00
host_dalvik_static_java_library.mk
host_executable.mk
host_executable_internal.mk
host_java_library.mk Use soong_zip instead of jar to generate .jar files in javac actions 2020-04-16 18:23:32 -07:00
host_java_library_common.mk
host_prebuilt.mk
host_shared_library.mk Mark the current BUILD_* warnings as errors by default 2020-03-07 11:29:29 -08:00
host_shared_library_internal.mk
host_static_library.mk Mark the current BUILD_* warnings as errors by default 2020-03-07 11:29:29 -08:00
host_static_library_internal.mk
install_jni_libs.mk
install_jni_libs_internal.mk Mark jni libs as REQUIRED by their app 2020-06-16 16:13:03 +08:00
instrumentation_test_config_template.xml Update auto-gen test config template with PARAMETERIZED_STRINGS 2020-05-18 09:58:18 +08:00
jacoco.mk Use unzip -DD 2020-07-13 14:26:25 -07:00
java.mk Remove obsolete PDK build functionality 2020-08-11 01:12:01 +00:00
java_common.mk Introduce TARGET_BUILD_UNBUNDLED_IMAGE 2020-08-03 15:47:09 +09:00
java_host_test_config_template.xml
java_host_unit_test_config_template.xml Add a template for java host unit tests 2020-11-19 09:42:41 -08:00
java_library.mk Remove support for stripping dex. 2019-10-21 09:36:45 +01:00
java_prebuilt_internal.mk Introduce TARGET_BUILD_UNBUNDLED_IMAGE 2020-08-03 15:47:09 +09:00
java_renderscript.mk Introduce TARGET_BUILD_UNBUNDLED_IMAGE 2020-08-03 15:47:09 +09:00
java_test_config_template.xml
jetifier.mk
link_type.mk More performance improvements 2020-06-10 17:18:13 -07:00
LINUX_KERNEL_COPYING
local_current_sdk.mk Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES 2020-08-24 23:16:19 +09:00
local_systemsdk.mk Exempt RRO from the restriction on API level 2020-04-28 10:25:41 +09:00
local_vndk.mk Restore "Linktype check for native:product" 2020-01-22 00:16:25 +00:00
main.mk jacoco-report-classes-all.jar doesn't depend on fake modules 2021-01-13 22:12:52 +09:00
Makefile Add support for packing multiple vendor ramdisks in vendor_boot 2020-12-17 11:07:04 +08:00
misc_prebuilt_internal.mk Add RENDERSCRIPT_BITCODE to misc_prebuilt_internal whitelist. 2019-11-11 15:21:06 -08:00
module_arch_supported.mk
multi_prebuilt.mk
multilib.mk
native_benchmark_test_config_template.xml
native_host_test_config_template.xml
native_test.mk
native_test_config_template.xml AutoGen: Support NativeTest with vendor namespace. 2020-09-01 10:33:47 +08:00
ninja_config.mk Remove build tasks for vts10 2020-10-05 10:17:21 -07:00
node_fns.mk
notice_files.mk Revert^2 "Rough-in license metadata support to make." 2021-01-06 20:52:43 -08:00
OWNERS Refactor OWNERS files in platform/build/make. 2020-10-08 16:14:44 -07:00
pack_dyn_relocs_setup.mk
package.mk Remove TARGET_PREFER_32_BIT. 2020-06-08 16:36:52 -07:00
package_internal.mk Remove obsolete PDK build functionality 2020-08-11 01:12:01 +00:00
pathmap.mk Fix up recovery_text_res 2020-05-27 19:37:03 -07:00
phony_package.mk
prebuilt.mk
prebuilt_internal.mk Add RENDERSCRIPT_BITCODE to misc prebuilt whitelist. 2019-11-11 09:30:38 -08:00
process_wrapper.sh
process_wrapper_gdb.cmds
process_wrapper_gdb.sh
product-graph.mk Ensure current product use PRODUCT_* vars directly 2019-10-30 14:29:42 +00:00
product.mk Merge "Revert^2 "Always turn on compatible property"" 2020-12-15 12:00:10 +00:00
product_config.mk Merge "Move jacocoagent installation to base_system" 2020-12-17 00:25:50 +00:00
proguard.flags
proguard.jacoco.flags
proguard_basic_keeps.flags
project_definitions.mk
python_binary_host_test_config_template.xml
rbe.mk Revert "Remove env-var-allowlist" 2020-10-20 05:52:49 +00:00
robolectric_test_config_template.xml Changes Robolectric test suite tag to its own value to enable filtering these in ATP. 2020-10-28 01:09:18 +00:00
root.mk
rust_device_test_config_template.xml Add rust_device_test_config_template.xml 2019-12-02 17:44:47 +00:00
rust_host_test_config_template.xml Add rust_host_test_config_template.xml 2019-11-14 09:57:13 -08:00
sdk_check.mk Use inclusive language in build/make 2020-06-12 21:10:55 -07:00
sdk_font.mk Move font xml files to "standard" directory 2020-01-29 18:26:32 +00:00
shared_library.mk Mark the current BUILD_* warnings as errors by default 2020-03-07 11:29:29 -08:00
shared_library_internal.mk Use the soong-built NDK CRT objects. 2020-07-17 15:23:57 -07:00
shell_test_config_template.xml Add test config template for sh_test. 2020-06-11 22:57:48 +00:00
soong_android_app_set.mk Update language to comply with inclusive guidance 2020-07-28 15:59:38 -07:00
soong_app_prebuilt.mk Merged and dist lists of unused methods from R8 2020-08-17 19:31:22 +00:00
soong_cc_prebuilt.mk Make the build fail when the executable prebuilt target check fails. 2020-10-07 21:04:51 +01:00
soong_config.mk Remove ANDROID_EXPERIMENTAL_MTE. 2021-01-11 10:55:51 -08:00
soong_droiddoc_prebuilt.mk Remove apidiff task and droiddoc jdiff support 2020-10-08 19:06:21 +01:00
soong_java_prebuilt.mk Merged and dist lists of unused methods from R8 2020-08-17 19:31:22 +00:00
soong_rust_prebuilt.mk Rust: Collect gnco files with CLANG_COVERAGE too. 2020-11-16 15:32:19 -05:00
static_java_library.mk Introduce TARGET_BUILD_UNBUNDLED_IMAGE 2020-08-03 15:47:09 +09:00
static_library.mk Mark the current BUILD_* warnings as errors by default 2020-03-07 11:29:29 -08:00
static_library_internal.mk Package coverage files as a zip. 2020-02-03 19:00:36 +00:00
suite_host_config.mk Generalize vts config module for other Suites 2019-10-18 18:28:23 +00:00
support_libraries.mk
sysprop.mk Skip generate-common-build-props for older devices without /product 2020-12-18 00:53:20 +01:00
target_test_internal.mk
use_lld_setup.mk
verify_uses_libraries.sh
version_defaults.mk Merge RQ1A.210105.003 to aosp-master - DO NOT MERGE 2021-01-05 18:30:21 -08:00
WINPTHREADS_COPYING