diff options
author | Jeff Gaston <jeffrygaston@google.com> | 2017-09-12 18:29:28 -0700 |
---|---|---|
committer | Jeff Gaston <jeffrygaston@google.com> | 2017-09-12 18:30:27 -0700 |
commit | 97001aaffd4bc86c2bd0c656807ce1d500abbec9 (patch) | |
tree | c9d585bd29212814d08f1a71513b9ca996a113b5 /androidmk/cmd | |
parent | 38f794ee496764f1b429c1786cf84758ba6f00a8 (diff) | |
download | build_soong-97001aaffd4bc86c2bd0c656807ce1d500abbec9.tar.gz build_soong-97001aaffd4bc86c2bd0c656807ce1d500abbec9.tar.bz2 build_soong-97001aaffd4bc86c2bd0c656807ce1d500abbec9.zip |
androidmk suport for aidl includes using LOCAL_PATH
Bug: 62882283
Test: m -j blueprint_tools # which runs unit tests
Change-Id: I6708aa21eada660a1f01759f090084692baa8937
Diffstat (limited to 'androidmk/cmd')
-rw-r--r-- | androidmk/cmd/androidmk/android.go | 6 | ||||
-rw-r--r-- | androidmk/cmd/androidmk/androidmk_test.go | 18 |
2 files changed, 23 insertions, 1 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index bdd3e97e..469e960d 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -27,6 +27,7 @@ type variableAssignmentContext struct { var rewriteProperties = map[string](func(variableAssignmentContext) error){ // custom functions + "LOCAL_AIDL_INCLUDES": localAidlIncludes, "LOCAL_C_INCLUDES": localIncludeDirs, "LOCAL_EXPORT_C_INCLUDE_DIRS": exportIncludeDirs, "LOCAL_LDFLAGS": ldflags, @@ -111,7 +112,6 @@ func init() { "LOCAL_DX_FLAGS": "dxflags", "LOCAL_JAVA_LIBRARIES": "libs", "LOCAL_STATIC_JAVA_LIBRARIES": "static_libs", - "LOCAL_AIDL_INCLUDES": "aidl.include_dirs", "LOCAL_AAPT_FLAGS": "aaptflags", "LOCAL_PACKAGE_SPLITS": "package_splits", "LOCAL_COMPATIBILITY_SUITE": "test_suites", @@ -308,6 +308,10 @@ func exportIncludeDirs(ctx variableAssignmentContext) error { return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_dirs", "local": "export_include_dirs"}) } +func localAidlIncludes(ctx variableAssignmentContext) error { + return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "aidl.include_dirs", "local": "aidl.local_include_dirs"}) +} + func stem(ctx variableAssignmentContext) error { val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.StringType) if err != nil { diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go index 037ce26a..664d12c2 100644 --- a/androidmk/cmd/androidmk/androidmk_test.go +++ b/androidmk/cmd/androidmk/androidmk_test.go @@ -407,6 +407,24 @@ cc_library_shared { }`, }, + { + + desc: "LOCAL_AIDL_INCLUDES", + in: ` +include $(CLEAR_VARS) +LOCAL_MODULE := iAmAModule +LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/main/java system/core +include $(BUILD_SHARED_LIBRARY)`, + + expected: ` +cc_library_shared { + name: "iAmAModule", + aidl: { + include_dirs: ["system/core"], + local_include_dirs: ["src/main/java"], + } +}`, + }, } func reformatBlueprint(input string) string { |