summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cc/library_stub.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/library_stub.go b/cc/library_stub.go
index d21df5105..08a5eb6ae 100644
--- a/cc/library_stub.go
+++ b/cc/library_stub.go
@@ -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
+ }
}
}
}