Merge changes from topic 'reverse-arch-includes' am: 22eab50d45
am: fca27e357b
Change-Id: Id4c19a1a92b426fe1f19ba8b8230360fff0af43b
This commit is contained in:
@@ -417,9 +417,11 @@ func createArchType(props reflect.Type) reflect.Type {
|
||||
variants := []string{}
|
||||
|
||||
for _, archVariant := range archVariants[arch] {
|
||||
archVariant := variantReplacer.Replace(archVariant)
|
||||
variants = append(variants, proptools.FieldNameForProperty(archVariant))
|
||||
}
|
||||
for _, feature := range archFeatures[arch] {
|
||||
feature := variantReplacer.Replace(feature)
|
||||
variants = append(variants, proptools.FieldNameForProperty(feature))
|
||||
}
|
||||
|
||||
@@ -876,12 +878,8 @@ func getMegaDeviceConfig() []archConfig {
|
||||
{"mips", "mips32r2-fp", "", []string{"mips"}},
|
||||
{"mips", "mips32r2-fp-xburst", "", []string{"mips"}},
|
||||
//{"mips", "mips32r6", "", []string{"mips"}},
|
||||
// mips32r2dsp[r2]-fp fails in the assembler for divdf3.c in compiler-rt:
|
||||
// (same errors in make and soong)
|
||||
// Error: invalid operands `mtlo $ac0,$11'
|
||||
// Error: invalid operands `mthi $ac0,$12'
|
||||
//{"mips", "mips32r2dsp-fp", "", []string{"mips"}},
|
||||
//{"mips", "mips32r2dspr2-fp", "", []string{"mips"}},
|
||||
{"mips", "mips32r2dsp-fp", "", []string{"mips"}},
|
||||
{"mips", "mips32r2dspr2-fp", "", []string{"mips"}},
|
||||
// mips64r2 is mismatching 64r2 and 64r6 libraries during linking to libgcc
|
||||
//{"mips64", "mips64r2", "", []string{"mips64"}},
|
||||
{"mips64", "mips64r6", "", []string{"mips64"}},
|
||||
|
@@ -390,7 +390,12 @@ func (c *config) DevicePrefer32BitExecutables() bool {
|
||||
}
|
||||
|
||||
func (c *config) SkipDeviceInstall() bool {
|
||||
return c.EmbeddedInMake() || Bool(c.Mega_device)
|
||||
return c.EmbeddedInMake()
|
||||
}
|
||||
|
||||
func (c *config) SkipMegaDeviceInstall(path string) bool {
|
||||
return Bool(c.Mega_device) &&
|
||||
strings.HasPrefix(path, filepath.Join(c.buildDir, "target", "product"))
|
||||
}
|
||||
|
||||
func (c *config) SanitizeHost() []string {
|
||||
|
@@ -647,14 +647,31 @@ func (a *androidModuleContext) InstallInSanitizerDir() bool {
|
||||
return a.module.InstallInSanitizerDir()
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool {
|
||||
if a.module.base().commonProperties.SkipInstall {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.Device() {
|
||||
if a.AConfig().SkipDeviceInstall() {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.AConfig().SkipMegaDeviceInstall(fullInstallPath.String()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallFileName(installPath OutputPath, name string, srcPath Path,
|
||||
deps ...Path) OutputPath {
|
||||
|
||||
fullInstallPath := installPath.Join(a, name)
|
||||
a.module.base().hooks.runInstallHooks(a, fullInstallPath, false)
|
||||
|
||||
if !a.module.base().commonProperties.SkipInstall &&
|
||||
(!a.Device() || !a.AConfig().SkipDeviceInstall()) {
|
||||
if !a.skipInstall(fullInstallPath) {
|
||||
|
||||
deps = append(deps, a.installDeps...)
|
||||
|
||||
@@ -691,8 +708,7 @@ func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name strin
|
||||
fullInstallPath := installPath.Join(a, name)
|
||||
a.module.base().hooks.runInstallHooks(a, fullInstallPath, true)
|
||||
|
||||
if !a.module.base().commonProperties.SkipInstall &&
|
||||
(!a.Device() || !a.AConfig().SkipDeviceInstall()) {
|
||||
if !a.skipInstall(fullInstallPath) {
|
||||
|
||||
a.ModuleBuild(pctx, ModuleBuildParams{
|
||||
Rule: Symlink,
|
||||
|
2
cc/cc.go
2
cc/cc.go
@@ -907,6 +907,8 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
} else {
|
||||
ctx.ModuleErrorf("module %q is not a gensrcs or genrule", name)
|
||||
}
|
||||
// Support exported headers from a generated_sources dependency
|
||||
fallthrough
|
||||
case genHeaderDepTag, genHeaderExportDepTag:
|
||||
if genRule, ok := m.(genrule.SourceFileGenerator); ok {
|
||||
depPaths.GeneratedHeaders = append(depPaths.GeneratedHeaders,
|
||||
|
@@ -69,11 +69,11 @@ type BaseCompilerProperties struct {
|
||||
// If possible, don't use this. If adding paths from the current directory use
|
||||
// local_include_dirs, if adding paths from other modules use export_include_dirs in
|
||||
// that module.
|
||||
Include_dirs []string `android:"arch_variant"`
|
||||
Include_dirs []string `android:"arch_variant,variant_prepend"`
|
||||
|
||||
// list of directories relative to the Blueprints file that will
|
||||
// be added to the include path using -I
|
||||
Local_include_dirs []string `android:"arch_variant"`
|
||||
Local_include_dirs []string `android:"arch_variant,variant_prepend",`
|
||||
|
||||
// list of generated sources to compile. These are the names of gensrcs or
|
||||
// genrule modules.
|
||||
@@ -198,15 +198,20 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
|
||||
// Include dir cflags
|
||||
localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs)
|
||||
if len(localIncludeDirs) > 0 {
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, includeDirsToFlags(localIncludeDirs))
|
||||
f := includeDirsToFlags(localIncludeDirs)
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, f)
|
||||
flags.YasmFlags = append(flags.YasmFlags, f)
|
||||
}
|
||||
rootIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Include_dirs)
|
||||
if len(rootIncludeDirs) > 0 {
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, includeDirsToFlags(rootIncludeDirs))
|
||||
f := includeDirsToFlags(rootIncludeDirs)
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, f)
|
||||
flags.YasmFlags = append(flags.YasmFlags, f)
|
||||
}
|
||||
|
||||
if !ctx.noDefaultCompilerFlags() {
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, "-I"+android.PathForModuleSrc(ctx).String())
|
||||
flags.YasmFlags = append(flags.YasmFlags, "-I"+android.PathForModuleSrc(ctx).String())
|
||||
|
||||
if !(ctx.sdk() || ctx.vndk()) || ctx.Host() {
|
||||
flags.SystemIncludeFlags = append(flags.SystemIncludeFlags,
|
||||
|
@@ -156,20 +156,25 @@ const (
|
||||
)
|
||||
|
||||
func init() {
|
||||
android.RegisterArchFeatures(android.Arm,
|
||||
"neon")
|
||||
|
||||
android.RegisterArchVariants(android.Arm,
|
||||
"armv5te",
|
||||
"armv7_a",
|
||||
"armv7_a_neon",
|
||||
"cortex_a7",
|
||||
"cortex_a8",
|
||||
"cortex_a9",
|
||||
"cortex_a15",
|
||||
"cortex_a53",
|
||||
"cortex_a53_a57",
|
||||
"armv7-a",
|
||||
"armv7-a-neon",
|
||||
"cortex-a7",
|
||||
"cortex-a8",
|
||||
"cortex-a9",
|
||||
"cortex-a15",
|
||||
"cortex-a53",
|
||||
"cortex-a53-a57",
|
||||
"krait",
|
||||
"kryo",
|
||||
"denver")
|
||||
|
||||
android.RegisterArchVariantFeatures(android.Arm, "armv7-a-neon", "neon")
|
||||
|
||||
// Krait and Kryo targets are not supported by GCC, but are supported by Clang,
|
||||
// so override the definitions when building modules with Clang.
|
||||
replaceFirst(armClangCpuVariantCflags["krait"], "-mcpu=cortex-a15", "-mcpu=krait")
|
||||
|
@@ -133,7 +133,11 @@ func init() {
|
||||
"mips32r2dsp_fp",
|
||||
"mips32r2dspr2_fp",
|
||||
"mips32r6")
|
||||
android.RegisterArchFeatures(android.Mips, "rev6")
|
||||
android.RegisterArchFeatures(android.Mips,
|
||||
"dspr2",
|
||||
"rev6")
|
||||
android.RegisterArchVariantFeatures(android.Mips, "mips32r2dspr2_fp",
|
||||
"dspr2")
|
||||
android.RegisterArchVariantFeatures(android.Mips, "mips32r6",
|
||||
"rev6")
|
||||
|
||||
|
@@ -306,7 +306,9 @@ func (library *libraryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Fla
|
||||
func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
exportIncludeDirs := library.flagExporter.exportedIncludes(ctx)
|
||||
if len(exportIncludeDirs) > 0 {
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, includeDirsToFlags(exportIncludeDirs))
|
||||
f := includeDirsToFlags(exportIncludeDirs)
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, f)
|
||||
flags.YasmFlags = append(flags.YasmFlags, f)
|
||||
}
|
||||
|
||||
return library.baseCompiler.compilerFlags(ctx, flags)
|
||||
|
Reference in New Issue
Block a user