From f64377ca2f49c8a3a49c11fb75a543165c3e91df Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Thu, 1 Jul 2021 06:50:40 +0000 Subject: [PATCH 1/3] Revert "Fix ndk and aml arch order" Revert "Add ramdisk_available to init_first_stage's deps" Revert submission 15071196-init_first_stage_soong Reason for revert: fixes b/192248690 Reverted Changes: I23cf4f975:Add ramdisk_available to init_first_stage's deps Icd98c7e24:Add ramdisk_available to init_first_stage's deps If9da9ba16:Add ramdisk_available to init_first_stage's deps Ibc8668029:Add ramdisk_available to init_first_stage's deps I3b4b8c475:Add ramdisk_available to init_first_stage's deps I59cd149e0:Completely migrate init first stage to Soong I36d789578:Add ramdisk_available to init_first_stage's deps I2a0daa612:Add BUILD_USES_RECOVERY_AS_BOOT to soong config Ic76c325ce:Directly create ramdisk dirs in ramdisk image rule... I4c5374deb:Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars I8aab5faf3:Add ramdisk_available to init_first_stage's deps I9d5a10661:Add ramdisk_available to init_first_stage's deps Iaa2edeb4a:Add ramdisk_available to init_first_stage's deps I7cb582ca0:Update init_first_stage I06091d15e:Add ramdisk_available to init_first_stage's deps I8bdb8dda3:Add ramdisk_available to init_first_stage's deps I7436b8dd1:Add ramdisk_available to init_first_stage's deps I39693fd86:Add ramdisk_available to init_first_stage's deps I0a9ba90f0:Add ramdisk_available to init_first_stage's deps Ib66b4c4ea:Add ramdisk_available to init_first_stage's deps I31ce63d23:Add ramdisk_available to init_first_stage's deps Icb580f97c:Add ramdisk_available to init_first_stage's deps I044a075b7:Add ramdisk_available to init_first_stage's deps I33164a7e7:Fix ndk and aml arch order Ib8d92904a:Add ramdisk_available to sysprop_library Ibc3516453:Add install_in_root to cc_binary Change-Id: Iaccc4bada78e63fdae3249adfc668c0b30418758 --- android/arch.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/arch.go b/android/arch.go index 84d1d59a0..bb1b61366 100644 --- a/android/arch.go +++ b/android/arch.go @@ -1543,20 +1543,20 @@ type archConfig struct { // getNdkAbisConfig returns a list of archConfigs for the ABIs supported by the NDK. func getNdkAbisConfig() []archConfig { return []archConfig{ - {"arm64", "armv8-a-branchprot", "", []string{"arm64-v8a"}}, {"arm", "armv7-a", "", []string{"armeabi-v7a"}}, - {"x86_64", "", "", []string{"x86_64"}}, + {"arm64", "armv8-a-branchprot", "", []string{"arm64-v8a"}}, {"x86", "", "", []string{"x86"}}, + {"x86_64", "", "", []string{"x86_64"}}, } } // getAmlAbisConfig returns a list of archConfigs for the ABIs supported by mainline modules. func getAmlAbisConfig() []archConfig { return []archConfig{ - {"arm64", "armv8-a", "", []string{"arm64-v8a"}}, {"arm", "armv7-a-neon", "", []string{"armeabi-v7a"}}, - {"x86_64", "", "", []string{"x86_64"}}, + {"arm64", "armv8-a", "", []string{"arm64-v8a"}}, {"x86", "", "", []string{"x86"}}, + {"x86_64", "", "", []string{"x86_64"}}, } } From 2594e41a070d22d372d7f3eb2949fe337f96a160 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Thu, 1 Jul 2021 06:50:40 +0000 Subject: [PATCH 2/3] Revert "Add ramdisk_available to sysprop_library" Revert "Add ramdisk_available to init_first_stage's deps" Revert submission 15071196-init_first_stage_soong Reason for revert: fixes b/192248690 Reverted Changes: I23cf4f975:Add ramdisk_available to init_first_stage's deps Icd98c7e24:Add ramdisk_available to init_first_stage's deps If9da9ba16:Add ramdisk_available to init_first_stage's deps Ibc8668029:Add ramdisk_available to init_first_stage's deps I3b4b8c475:Add ramdisk_available to init_first_stage's deps I59cd149e0:Completely migrate init first stage to Soong I36d789578:Add ramdisk_available to init_first_stage's deps I2a0daa612:Add BUILD_USES_RECOVERY_AS_BOOT to soong config Ic76c325ce:Directly create ramdisk dirs in ramdisk image rule... I4c5374deb:Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars I8aab5faf3:Add ramdisk_available to init_first_stage's deps I9d5a10661:Add ramdisk_available to init_first_stage's deps Iaa2edeb4a:Add ramdisk_available to init_first_stage's deps I7cb582ca0:Update init_first_stage I06091d15e:Add ramdisk_available to init_first_stage's deps I8bdb8dda3:Add ramdisk_available to init_first_stage's deps I7436b8dd1:Add ramdisk_available to init_first_stage's deps I39693fd86:Add ramdisk_available to init_first_stage's deps I0a9ba90f0:Add ramdisk_available to init_first_stage's deps Ib66b4c4ea:Add ramdisk_available to init_first_stage's deps I31ce63d23:Add ramdisk_available to init_first_stage's deps Icb580f97c:Add ramdisk_available to init_first_stage's deps I044a075b7:Add ramdisk_available to init_first_stage's deps I33164a7e7:Fix ndk and aml arch order Ib8d92904a:Add ramdisk_available to sysprop_library Ibc3516453:Add install_in_root to cc_binary Change-Id: I9ac333972fcd016059ea73f48b295d7140414a50 --- sysprop/sysprop_library.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go index a29d4c3ac..f1c2d0df0 100644 --- a/sysprop/sysprop_library.go +++ b/sysprop/sysprop_library.go @@ -145,9 +145,6 @@ type syspropLibraryProperties struct { // If set to true, allow this module to be dexed and installed on devices. Installable *bool - // Make this module available when building for ramdisk - Ramdisk_available *bool - // Make this module available when building for recovery Recovery_available *bool @@ -399,7 +396,6 @@ type ccLibraryProperties struct { Recovery_available *bool Vendor_available *bool Product_available *bool - Ramdisk_available *bool Host_supported *bool Apex_available []string Min_sdk_version *string @@ -479,7 +475,6 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) { ccProps.Recovery_available = m.properties.Recovery_available ccProps.Vendor_available = m.properties.Vendor_available ccProps.Product_available = m.properties.Product_available - ccProps.Ramdisk_available = m.properties.Ramdisk_available ccProps.Host_supported = m.properties.Host_supported ccProps.Apex_available = m.ApexProperties.Apex_available ccProps.Min_sdk_version = m.properties.Cpp.Min_sdk_version From c5fe044474f1be7229c21707b443ee579c17cfcb Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Thu, 1 Jul 2021 06:50:40 +0000 Subject: [PATCH 3/3] Revert "Add install_in_root to cc_binary" Revert "Add ramdisk_available to init_first_stage's deps" Revert submission 15071196-init_first_stage_soong Reason for revert: fixes b/192248690 Reverted Changes: I23cf4f975:Add ramdisk_available to init_first_stage's deps Icd98c7e24:Add ramdisk_available to init_first_stage's deps If9da9ba16:Add ramdisk_available to init_first_stage's deps Ibc8668029:Add ramdisk_available to init_first_stage's deps I3b4b8c475:Add ramdisk_available to init_first_stage's deps I59cd149e0:Completely migrate init first stage to Soong I36d789578:Add ramdisk_available to init_first_stage's deps I2a0daa612:Add BUILD_USES_RECOVERY_AS_BOOT to soong config Ic76c325ce:Directly create ramdisk dirs in ramdisk image rule... I4c5374deb:Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars I8aab5faf3:Add ramdisk_available to init_first_stage's deps I9d5a10661:Add ramdisk_available to init_first_stage's deps Iaa2edeb4a:Add ramdisk_available to init_first_stage's deps I7cb582ca0:Update init_first_stage I06091d15e:Add ramdisk_available to init_first_stage's deps I8bdb8dda3:Add ramdisk_available to init_first_stage's deps I7436b8dd1:Add ramdisk_available to init_first_stage's deps I39693fd86:Add ramdisk_available to init_first_stage's deps I0a9ba90f0:Add ramdisk_available to init_first_stage's deps Ib66b4c4ea:Add ramdisk_available to init_first_stage's deps I31ce63d23:Add ramdisk_available to init_first_stage's deps Icb580f97c:Add ramdisk_available to init_first_stage's deps I044a075b7:Add ramdisk_available to init_first_stage's deps I33164a7e7:Fix ndk and aml arch order Ib8d92904a:Add ramdisk_available to sysprop_library Ibc3516453:Add install_in_root to cc_binary Change-Id: I3f48a1bee726c7c2b38c9bdc501b2a32337eaab7 --- android/neverallow.go | 10 ---------- cc/cc.go | 5 ----- cc/installer.go | 13 ------------- 3 files changed, 28 deletions(-) diff --git a/android/neverallow.go b/android/neverallow.go index 19b58a775..41b399a70 100644 --- a/android/neverallow.go +++ b/android/neverallow.go @@ -55,7 +55,6 @@ func init() { AddNeverAllowRules(createCcSdkVariantRules()...) AddNeverAllowRules(createUncompressDexRules()...) AddNeverAllowRules(createMakefileGoalRules()...) - AddNeverAllowRules(createInitFirstStageRules()...) } // Add a NeverAllow rule to the set of rules to apply. @@ -217,15 +216,6 @@ func createMakefileGoalRules() []Rule { } } -func createInitFirstStageRules() []Rule { - return []Rule{ - NeverAllow(). - Without("name", "init_first_stage"). - With("install_in_root", "true"). - Because("install_in_root is only for init_first_stage."), - } -} - func neverallowMutator(ctx BottomUpMutatorContext) { m, ok := ctx.Module().(Module) if !ok { diff --git a/cc/cc.go b/cc/cc.go index 89c4fc38e..be2c0a39a 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -580,7 +580,6 @@ type installer interface { hostToolPath() android.OptionalPath relativeInstallPath() string makeUninstallable(mod *Module) - installInRoot() bool } // bazelHandler is the interface for a helper object related to deferring to Bazel for @@ -1307,10 +1306,6 @@ func (c *Module) isCfiAssemblySupportEnabled() bool { Bool(c.sanitize.Properties.Sanitize.Config.Cfi_assembly_support) } -func (c *Module) InstallInRoot() bool { - return c.installer != nil && c.installer.installInRoot() -} - type baseModuleContext struct { android.BaseModuleContext moduleContextImpl diff --git a/cc/installer.go b/cc/installer.go index f95b49346..e551c63e2 100644 --- a/cc/installer.go +++ b/cc/installer.go @@ -25,10 +25,6 @@ import ( type InstallerProperties struct { // install to a subdirectory of the default install path for the module Relative_install_path *string `android:"arch_variant"` - - // Install output directly in {partition}/, not in any subdir. This is only intended for use by - // init_first_stage. - Install_in_root *bool `android:"arch_variant"` } type installLocation int @@ -70,11 +66,6 @@ func (installer *baseInstaller) installDir(ctx ModuleContext) android.InstallPat if ctx.toolchain().Is64Bit() && installer.dir64 != "" { dir = installer.dir64 } - - if installer.installInRoot() { - dir = "" - } - if ctx.Target().NativeBridge == android.NativeBridgeEnabled { dir = filepath.Join(dir, ctx.Target().NativeBridgeRelativePath) } else if !ctx.Host() && ctx.Config().HasMultilibConflict(ctx.Arch().ArchType) { @@ -119,7 +110,3 @@ func (installer *baseInstaller) relativeInstallPath() string { func (installer *baseInstaller) makeUninstallable(mod *Module) { mod.ModuleBase.MakeUninstallable() } - -func (installer *baseInstaller) installInRoot() bool { - return Bool(installer.Properties.Install_in_root) -}