AIDEGen:fix module_bp_cc_deps.json content error.

Bug: 147324044
Test: 1. export SOONG_COLLECT_CC_DEPS=1 SOONG_GEN_CMAKEFILES=1;m nothing
         module_bp_cc_deps.json will be generated.
	 In module_bp_cc_deps.json,
	 "libui": {
             ...
             "system_include_flags": {
                 "header_search_path": [
                     "system/core/include",
                     "system/media/audio/include",
                     "hardware/libhardware/include",
                     "hardware/libhardware_legacy/include",
                     "hardware/ril/include",
                     "frameworks/native/include",
                     "frameworks/native/opengl/include",
                     "frameworks/av/include",
                     "libnativehelper/include_jni"
                 ]
                 "system_search_path": [
                     "bionic/libc/include",
                     "bionic/libc/kernel/uapi",
                     "bionic/libc/kernel/uapi/asm-x86",
                     "bionic/libc/kernel/android/scsi",
                     "bionic/libc/kernel/android/uapi"
                 ]
             },
             ...
         },

Change-Id: Iabc638ca451f568b2a4c09327f8f3c220f6fc154
This commit is contained in:
bralee 2020-01-08 09:10:53 +08:00
parent 3afbc923dc
commit adba3c0a0a

View file

@ -142,7 +142,7 @@ func parseCompilerCCParameters(ctx android.SingletonContext, params []string) cc
compilerParams.HeaderSearchPath =
append(compilerParams.HeaderSearchPath, strings.TrimPrefix(param, "-I"))
case systemHeaderSearchPath:
if i < len(params)-1 {
if i < len(cparams)-1 {
compilerParams.SystemHeaderSearchPath = append(compilerParams.SystemHeaderSearchPath, cparams[i+1])
}
i = i + 1