diff options
author | Anton Hansson | 2019-01-08 09:39:37 -0600 |
---|---|---|
committer | Anton Hansson | 2019-01-09 04:50:57 -0600 |
commit | 1976a25692e5c9c19f4dcd86de38d7da9279e3b9 (patch) | |
tree | 498a2ce29102f5127b73717cadfd05adb8761ad3 /androidmk | |
parent | 1f8076b42dfd99d01b720c027bafd7f671b1d12a (diff) | |
download | platform-build-soong-1976a25692e5c9c19f4dcd86de38d7da9279e3b9.tar.gz platform-build-soong-1976a25692e5c9c19f4dcd86de38d7da9279e3b9.tar.xz platform-build-soong-1976a25692e5c9c19f4dcd86de38d7da9279e3b9.zip |
Make androidmk translate LOCAL_32_BIT_ONLY
Translate LOCAL_32_BIT_ONLY := true to compile_multilib: "32".
Test: androidmk frameworks/av/services/mediadrm/Android.mk
Change-Id: I9f73f5fdfc67738286844ff42b39ee54403fe649
Diffstat (limited to 'androidmk')
-rw-r--r-- | androidmk/cmd/androidmk/android.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index d16ac934..c8228ede 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go | |||
@@ -42,6 +42,7 @@ type variableAssignmentContext struct { | |||
42 | 42 | ||
43 | var rewriteProperties = map[string](func(variableAssignmentContext) error){ | 43 | var rewriteProperties = map[string](func(variableAssignmentContext) error){ |
44 | // custom functions | 44 | // custom functions |
45 | "LOCAL_32_BIT_ONLY": local32BitOnly, | ||
45 | "LOCAL_AIDL_INCLUDES": localAidlIncludes, | 46 | "LOCAL_AIDL_INCLUDES": localAidlIncludes, |
46 | "LOCAL_C_INCLUDES": localIncludeDirs, | 47 | "LOCAL_C_INCLUDES": localIncludeDirs, |
47 | "LOCAL_EXPORT_C_INCLUDE_DIRS": exportIncludeDirs, | 48 | "LOCAL_EXPORT_C_INCLUDE_DIRS": exportIncludeDirs, |
@@ -360,6 +361,20 @@ func exportIncludeDirs(ctx variableAssignmentContext) error { | |||
360 | return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_dirs", "local": "export_include_dirs"}) | 361 | return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_dirs", "local": "export_include_dirs"}) |
361 | } | 362 | } |
362 | 363 | ||
364 | func local32BitOnly(ctx variableAssignmentContext) error { | ||
365 | val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.BoolType) | ||
366 | if err != nil { | ||
367 | return err | ||
368 | } | ||
369 | if val.(*bpparser.Bool).Value { | ||
370 | thirtyTwo := &bpparser.String{ | ||
371 | Value: "32", | ||
372 | } | ||
373 | setVariable(ctx.file, false, ctx.prefix, "compile_multilib", thirtyTwo, true) | ||
374 | } | ||
375 | return nil | ||
376 | } | ||
377 | |||
363 | func localAidlIncludes(ctx variableAssignmentContext) error { | 378 | func localAidlIncludes(ctx variableAssignmentContext) error { |
364 | return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "aidl.include_dirs", "local": "aidl.local_include_dirs"}) | 379 | return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "aidl.include_dirs", "local": "aidl.local_include_dirs"}) |
365 | } | 380 | } |