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