Merge "Fix non-deterministic errors with LOCAL_*_x86_64" am: ad14e6e227
am: 95879d5b51
* commit '95879d5b51ce847bc60b7448641fffce617afbc0':
Fix non-deterministic errors with LOCAL_*_x86_64
Change-Id: I09f2416293aba18fd2faeeb16e2ef4406dab3b38
This commit is contained in:
@@ -313,15 +313,17 @@ var deleteProperties = map[string]struct{}{
|
|||||||
"LOCAL_CPP_EXTENSION": struct{}{},
|
"LOCAL_CPP_EXTENSION": struct{}{},
|
||||||
}
|
}
|
||||||
|
|
||||||
var propertyPrefixes = map[string]string{
|
// Shorter suffixes of other suffixes must be at the end of the list
|
||||||
"arm": "arch.arm",
|
var propertyPrefixes = []struct{ mk, bp string }{
|
||||||
"arm64": "arch.arm64",
|
{"arm", "arch.arm"},
|
||||||
"mips": "arch.mips",
|
{"arm64", "arch.arm64"},
|
||||||
"mips64": "arch.mips64",
|
{"mips", "arch.mips"},
|
||||||
"x86": "arch.x86",
|
{"mips64", "arch.mips64"},
|
||||||
"x86_64": "arch.x86_64",
|
{"x86", "arch.x86"},
|
||||||
"32": "multilib.lib32",
|
{"x86_64", "arch.x86_64"},
|
||||||
"64": "multilib.lib64",
|
{"32", "multilib.lib32"},
|
||||||
|
// 64 must be after x86_64
|
||||||
|
{"64", "multilib.lib64"},
|
||||||
}
|
}
|
||||||
|
|
||||||
var conditionalTranslations = map[string]map[bool]string{
|
var conditionalTranslations = map[string]map[bool]string{
|
||||||
|
@@ -195,10 +195,10 @@ func handleAssignment(file *bpFile, assignment mkparser.Assignment, c *condition
|
|||||||
prefix := ""
|
prefix := ""
|
||||||
|
|
||||||
if strings.HasPrefix(name, "LOCAL_") {
|
if strings.HasPrefix(name, "LOCAL_") {
|
||||||
for k, v := range propertyPrefixes {
|
for _, x := range propertyPrefixes {
|
||||||
if strings.HasSuffix(name, "_"+k) {
|
if strings.HasSuffix(name, "_"+x.mk) {
|
||||||
name = strings.TrimSuffix(name, "_"+k)
|
name = strings.TrimSuffix(name, "_"+x.mk)
|
||||||
prefix = v
|
prefix = x.bp
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user