aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2015-03-19 17:25:29 -0700
committerTim Kilbourn <tkilbourn@google.com>2015-03-19 17:26:22 -0700
commit3f0c9ede6ddd1da33ed0072646a07f36628f2d3e (patch)
tree1e993efc70025e29ff96fb9794c552f928435db2 /androidmk
parent6b29069d42c7084b948a1670230c2807014e41cc (diff)
downloadbuild_soong-3f0c9ede6ddd1da33ed0072646a07f36628f2d3e.tar.gz
build_soong-3f0c9ede6ddd1da33ed0072646a07f36628f2d3e.tar.bz2
build_soong-3f0c9ede6ddd1da33ed0072646a07f36628f2d3e.zip
Add support for LOCAL_ARM_MODE in androidmk
Uses a hack to nest it inside of an arch-arm block. Change-Id: Id36c7398e4a91fc8dd69fa7d1f78c9d30258281a
Diffstat (limited to 'androidmk')
-rw-r--r--androidmk/cmd/androidmk/android.go13
-rw-r--r--androidmk/cmd/androidmk/androidmk.go6
2 files changed, 13 insertions, 6 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 5544dfde..b79e821f 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -17,12 +17,13 @@ const (
)
var stringProperties = map[string]string{
- "LOCAL_MODULE": "name",
- "LOCAL_MODULE_STEM": "stem",
- "LOCAL_MODULE_CLASS": "class",
- "LOCAL_CXX_STL": "stl",
- "LOCAL_STRIP_MODULE": "strip",
- "LOCAL_MULTILIB": "compile_multilib",
+ "LOCAL_MODULE": "name",
+ "LOCAL_MODULE_STEM": "stem",
+ "LOCAL_MODULE_CLASS": "class",
+ "LOCAL_CXX_STL": "stl",
+ "LOCAL_STRIP_MODULE": "strip",
+ "LOCAL_MULTILIB": "compile_multilib",
+ "LOCAL_ARM_MODE_HACK": "instruction_set",
}
var listProperties = map[string]string{
diff --git a/androidmk/cmd/androidmk/androidmk.go b/androidmk/cmd/androidmk/androidmk.go
index fd31a138..eca597eb 100644
--- a/androidmk/cmd/androidmk/androidmk.go
+++ b/androidmk/cmd/androidmk/androidmk.go
@@ -246,6 +246,12 @@ func handleAssignment(file *bpFile, assignment mkparser.Assignment, c *condition
} else {
if name == "LOCAL_PATH" {
// Nothing to do, except maybe avoid the "./" in paths?
+ } else if name == "LOCAL_ARM_MODE" {
+ // This is a hack to get the LOCAL_ARM_MODE value inside
+ // of an arch: { arm: {} } block.
+ armModeAssign := assignment
+ armModeAssign.Name = mkparser.SimpleMakeString("LOCAL_ARM_MODE_HACK_arm", assignment.Name.Pos)
+ handleAssignment(file, armModeAssign, c)
} else if strings.HasPrefix(name, "LOCAL_") {
//setVariable(file, assignment, name, bpparser.String, true)
switch name {