platform_build/core
Inseob Kim 232f6ac676 Add PlatformSepolicyVersion to soong_config
PlatformSepolicyVersion and BoardSepolicyVers haven't assigned correctly
so far. Below is the reason why it hasn't been discovered yet.

DeviceConfig.PlatformSepolicyVersion() was added to support mixed
sepolicy build (setting BOARD_SEPOLICY_VERS and building vendor sepolicy
with old plat policy files). Soong compares PlatformSepolicyVersion()
and BoardSepolicyVers(), and used old vendor sources if both are
different. Back then, the only place where such logic played a role was
selinux contexts. Test codes were running as intended: after setting
BOARD_SEPOLICY_VERS the context files were built against old policies.

But there were two mistakes:

1) PlatformSepolicyVersion() was not added to soong_config.mk, so it was
always empty.
2) BOARD_SEPOLICY_VERS was set to default in system/sepolicy/Android.mk,
which was processed after soong_config. So if BOARD_SEPOLICY_VERS was
not set in BoardConfig.mk, BoardSepolicyVers() was empty, not
PLATFORM_SEPOLICY_VERSION.

And there were no issues as Soong only checked equality.

To fix the issue correctly, this commit adds the variable
PlatformSepolicyVersion, and then handles BoardSepolicyVers correctly by
returning PlatformSepolicyVersion if it's empty.

Test: set BOARD_SEPOLICY_VERS and see vendor_file_contexts changes
Change-Id: I4e306ec1f5225094a39f0c8d94f5e7683d70d60e
2021-03-22 22:34:40 +09:00
..
clang Do not append empty DEFAULT_TIDY_HEADER_DIRS 2021-02-11 22:36:04 -08:00
combo Add armv8-a-branchprot arch variant 2021-01-28 17:10:24 +01:00
tasks [LSC] Add LOCAL_LICENSE_KINDS to build/make 2021-03-10 23:31:03 -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 Always use ART sources for Fuchsia. 2021-03-05 15:59:20 +00:00
app_certificate_validate.mk Use inclusive language in build/make 2020-06-12 21:10:55 -07:00
app_prebuilt_internal.mk Consolidate manifest_check for different module types. 2021-03-19 11:00:51 +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 Remove LOCAL_LICENSE_KINDS from core makefiles. 2021-02-16 04:37:23 -08:00
binary.mk Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__ 2021-03-15 18:17:35 +09:00
board_config.mk Add bootconfig to kernel cmdline when BOARD_BOOTCONFIG not empty 2021-03-10 16:28:49 -08:00
build-system.html Document unbundle build behavior 2020-08-06 18:25:51 +09:00
build_id.mk Version bump to RQ2A.210305.007 [core/build_id.mk] 2021-02-04 22:27:50 +00:00
build_rro_package.mk
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 Merge <uses-library> dependency configs into dexpreopt.config files. 2021-01-28 14:59:14 +00:00
config.mk Include android_soong_config_vars.mk in the make (kati) step. 2021-03-01 23:14:10 +00:00
config_sanitizers.mk Merge "Enable cfi for 32bit arch" 2021-03-12 12:41:39 +00:00
configure_module_stem.mk
copy_headers.mk
cxx_stl_setup.mk Switch platform EH unwinder to prebuilt LLVM libunwind 2021-01-13 19:36:53 -08:00
definitions.mk Allow missing classes in R8 mk builds 2021-02-22 13:21:00 +01: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 Add non-fatal mode for verify_uses_libraries check. 2021-02-22 14:49:47 +00:00
dex_preopt_config_merger.py Preserve <uses-library> order in dexpreopt.config files. 2021-02-11 17:09:19 +00:00
dex_preopt_libart.mk Remove LOCAL_LICENSE_KINDS from core makefiles. 2021-02-16 04:37:23 -08:00
dex_preopt_odex_install.mk Reorder compatibility libraries used in class loader context. 2021-03-19 11:01:53 +00:00
distdir.mk Remove obsolete PDK build functionality 2020-08-11 01:12:01 +00:00
dumpconfig.mk Generate FlatConfig objects from GenericConfig objects. 2021-02-22 17:18:07 -08:00
dumpvar.mk Make dump-many-vars work for large variables 2020-11-07 01:38:20 +00:00
dynamic_binary.mk
empty_test_config.xml
envsetup.mk Rename vendor-ramdisk to vendor_ramdisk 2021-03-03 13:56:48 -08: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 Turn missing jarjar output files into errors 2021-02-08 10:55:05 -08:00
host_dalvik_static_java_library.mk
host_executable.mk
host_executable_internal.mk
host_java_library.mk Turn missing jarjar output files into errors 2021-02-08 10:55:05 -08: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 Consolidate manifest_check for different module types. 2021-03-19 11:00:51 +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
java_prebuilt_internal.mk Consolidate manifest_check for different module types. 2021-03-19 11:00:51 +00:00
java_renderscript.mk [DO NOT MERGE] Add labels to rewrapper cc compile action. Prevent ccwrapper from being used in links. 2020-08-31 12:35:23 +00: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 Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__ 2021-03-15 18:17:35 +09:00
main.mk Define ro.board.first_api_level property 2021-03-17 15:00:23 +09:00
Makefile Merge "Extracting kernel should not depend on system/vendor build." 2021-03-19 22:00:15 +00:00
misc_prebuilt_internal.mk
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 Keep the first and last snapshot of variables. 2021-02-17 10:02:41 -08:00
notice_files.mk Avoid duplicate installed notice file rules. 2021-02-21 09:03:15 -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 Consolidate manifest_check for different module types. 2021-03-19 11:00:51 +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
process_wrapper.sh
process_wrapper_gdb.cmds
process_wrapper_gdb.sh
product-graph.mk
product.mk Add a product variable to override APEX modules in boot jar lists. 2021-03-02 20:53:59 +00:00
product_config.mk Add a product variable to override APEX modules in boot jar lists. 2021-03-02 20:53:59 +00:00
proguard.flags
proguard.jacoco.flags
proguard_basic_keeps.flags
project_definitions.mk
python_binary_host_test_config_template.xml
rbe.mk Merge "Revert "Remove env-var-allowlist"" am: fd8dae609f am: fe4c812bad 2020-10-20 21:04: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
rust_host_test_config_template.xml
sdk_check.mk Use inclusive language in build/make 2020-06-12 21:10:55 -07:00
sdk_font.mk
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 Add LOCAL_APKCERTS_FILE support. 2020-07-30 17:43:32 -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 Add PlatformSepolicyVersion to soong_config 2021-03-22 22:34:40 +09:00
soong_droiddoc_prebuilt.mk Remove apidiff task and droiddoc jdiff support 2020-10-08 19:06:21 +01:00
soong_java_prebuilt.mk Merge <uses-library> dependency configs into dexpreopt.config files. 2021-01-28 14:59:14 +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
suite_host_config.mk
support_libraries.mk
sysprop.mk Fix typo in sysprop.mk and Changes.md 2021-03-02 08:51:03 +09:00
target_test_internal.mk Add MTE ELF note to makefile-generated native tests. 2021-03-15 10:45:05 -07:00
use_lld_setup.mk
version_defaults.mk Merge RQ2A.210305.007 into stage. 2021-03-01 00:54:23 -08:00
WINPTHREADS_COPYING