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
diff --git a/cc/library_stub.go b/cc/library_stub.go
index d21df51..08a5eb6 100644
--- a/cc/library_stub.go
+++ b/cc/library_stub.go
@@ -205,6 +205,14 @@
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
+ }
}
}
}