Skip to content

Commit

Permalink
soong: always use -mfpu=neon-vfpv4 for Krait targets
Browse files Browse the repository at this point in the history
* GCC and Clang both support this, so we may as well simplify
  the logic.

Test: make otapackage

Change-Id: I8c2e9f3875cb662db708c799c9ce54f9fdd55981
  • Loading branch information
xboxfanj authored and IronSharpensIron2717 committed Nov 2, 2017
1 parent 1967582 commit b9d5194
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cc/config/arm_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ var (
},
"krait": []string{
"-mcpu=cortex-a15",
"-mfpu=neon-vfpv4",
// Fake an ARM compiler flag as these processors support LPAE which GCC/clang
// don't advertise.
// TODO This is a hack and we need to add it for each processor that supports LPAE until some
Expand Down Expand Up @@ -175,9 +176,9 @@ func init() {
slice[0] = to
}

// 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")
armClangCpuVariantCflags["krait"] = append(armClangCpuVariantCflags["krait"], "-mfpu=neon-vfpv4")

replaceFirst(armClangCpuVariantCflags["kryo"], "-mcpu=cortex-a15", "-mcpu=krait")
armClangCpuVariantCflags["kryo"] = append(armClangCpuVariantCflags["kryo"], "-mfpu=neon-vfpv4")

Expand Down

0 comments on commit b9d5194

Please sign in to comment.