soong: allow overriding header files
Includes: Author: Jan Altensen <info@stricted.net> Date: Sat Aug 7 19:41:59 2021 +0200 soong: move header override to compiler.go * library.go only covers libraries Change-Id: I3374999d6b364dd1bbc2060996964ee7b04493e7 Change-Id: Ia9d2210605c5927b529fbe9485b0e5abd079f487
This commit is contained in:
@@ -362,6 +362,15 @@ func parseCStd(cStdPtr *string) string {
|
||||
func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags {
|
||||
tc := ctx.toolchain()
|
||||
modulePath := ctx.ModuleDir()
|
||||
additionalIncludeDirs := ctx.DeviceConfig().TargetSpecificHeaderPath()
|
||||
if len(additionalIncludeDirs) > 0 {
|
||||
// devices can have multiple paths in TARGET_SPECIFIC_HEADER_PATH
|
||||
// add -I in front of all of them
|
||||
if (strings.Contains(additionalIncludeDirs, " ")) {
|
||||
additionalIncludeDirs = strings.ReplaceAll(additionalIncludeDirs, " ", " -I")
|
||||
}
|
||||
flags.Local.CommonFlags = append(flags.Local.CommonFlags, "-I" + additionalIncludeDirs)
|
||||
}
|
||||
|
||||
srcs := compiler.Properties.Srcs.GetOrDefault(ctx, nil)
|
||||
exclude_srcs := compiler.Properties.Exclude_srcs.GetOrDefault(ctx, nil)
|
||||
|
Reference in New Issue
Block a user