Export system headers for SdkVariants as well

This code block exists for LLDNK code path (m.UseVndk()...), but was
missing from NDK code path (m.IsSdkVariant())

Test: TH
Change-Id: Ib156d14a6f013c88499a0641dbb547c632357362
This commit is contained in:
Spandan Das
2023-01-18 19:46:47 +00:00
parent 57f70c03cd
commit 98c000ae43

View File

@@ -205,6 +205,14 @@ func (d *apiLibraryDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps
d.libraryDecorator.flagExporter.Properties.Export_include_dirs = append(
d.libraryDecorator.flagExporter.Properties.Export_include_dirs,
variantMod.exportProperties.Export_include_dirs...)
// Export headers as system include dirs if specified. Mostly for libc
if Bool(variantMod.exportProperties.Export_headers_as_system) {
d.libraryDecorator.flagExporter.Properties.Export_system_include_dirs = append(
d.libraryDecorator.flagExporter.Properties.Export_system_include_dirs,
d.libraryDecorator.flagExporter.Properties.Export_include_dirs...)
d.libraryDecorator.flagExporter.Properties.Export_include_dirs = nil
}
}
}
}