Promote stl to a fixed feature
cc needs to know what stl was selected, promote stl from a generic
feature implementation to a fixed type pointer.
Change-Id: I950ef947f7cd254fe3074f4ff240bb2b90b9116c
diff --git a/cc/cc.go b/cc/cc.go
index 417dc0d..18dd09c 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -528,6 +528,7 @@
compiler compiler
linker linker
installer installer
+ stl *stl
outputFile common.OptionalPath
@@ -548,6 +549,9 @@
if c.installer != nil {
props = append(props, c.installer.props()...)
}
+ if c.stl != nil {
+ props = append(props, c.stl.props()...)
+ }
for _, feature := range c.features {
props = append(props, feature.props()...)
}
@@ -627,9 +631,7 @@
func newModule(hod common.HostOrDeviceSupported, multilib common.Multilib) *Module {
module := newBaseModule(hod, multilib)
- module.features = []feature{
- &stlFeature{},
- }
+ module.stl = &stl{}
return module
}
@@ -653,6 +655,9 @@
if c.linker != nil {
flags = c.linker.flags(ctx, flags)
}
+ if c.stl != nil {
+ flags = c.stl.flags(ctx, flags)
+ }
for _, feature := range c.features {
flags = feature.flags(ctx, flags)
}
@@ -726,6 +731,9 @@
if c.linker != nil {
c.linker.begin(ctx)
}
+ if c.stl != nil {
+ c.stl.begin(ctx)
+ }
for _, feature := range c.features {
feature.begin(ctx)
}
@@ -740,6 +748,9 @@
if c.linker != nil {
deps = c.linker.deps(ctx, deps)
}
+ if c.stl != nil {
+ deps = c.stl.deps(ctx, deps)
+ }
for _, feature := range c.features {
deps = feature.deps(ctx, deps)
}