Lines Matching refs:ctx
61 func (stl *stl) begin(ctx BaseModuleContext) {
67 if ctx.useSdk() && ctx.Device() {
80 ctx.ModuleErrorf("stl: %q is not a supported STL with sdk_version set", s)
83 } else if ctx.Windows() {
91 ctx.ModuleErrorf("stl: %q is not a supported STL for windows", s)
94 } else if ctx.Fuchsia() {
105 if ctx.static() {
111 ctx.ModuleErrorf("stl: %q is not a supported STL on Fuchsia", s)
125 if ctx.static() {
131 ctx.ModuleErrorf("stl: %q is not a supported STL", s)
138 func needsLibAndroidSupport(ctx BaseModuleContext) bool {
139 versionStr, err := normalizeNdkApiLevel(ctx, ctx.sdkVersion(), ctx.Arch())
141 ctx.PropertyErrorf("sdk_version", err.Error())
158 func staticUnwinder(ctx android.BaseModuleContext) string {
159 if ctx.Arch().ArchType == android.Arm {
166 func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
176 if ctx.Device() && !ctx.useSdk() {
185 if ctx.toolchain().Bionic() {
186 if ctx.staticBinary() {
187 deps.StaticLibs = append(deps.StaticLibs, "libm", "libc", staticUnwinder(ctx))
194 if ctx.toolchain().Bionic() && ctx.Module().Name() == "libc++" {
208 if needsLibAndroidSupport(ctx) {
211 if ctx.Arch().ArchType == android.Arm {
223 func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
226 if ctx.Darwin() {
238 if !ctx.toolchain().Bionic() {
241 if ctx.Windows() {
244 if ctx.Arch().ArchType == android.X86 {
256 if ctx.Arch().ArchType == android.Arm {
263 ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include")
266 if ctx.Arch().ArchType == android.Arm {
272 if !ctx.toolchain().Bionic() {