Lines Matching refs:compiler

216 var _ compiler = (*baseCompiler)(nil)
222 func (compiler *baseCompiler) Srcs() android.Paths {
223 return append(android.Paths{}, compiler.srcs...)
226 func (compiler *baseCompiler) appendCflags(flags []string) {
227 compiler.Properties.Cflags = append(compiler.Properties.Cflags, flags...)
230 func (compiler *baseCompiler) appendAsflags(flags []string) {
231 compiler.Properties.Asflags = append(compiler.Properties.Asflags, flags...)
234 func (compiler *baseCompiler) compilerProps() []interface{} {
235 return []interface{}{&compiler.Properties, &compiler.Proto}
238 func (compiler *baseCompiler) compilerInit(ctx BaseModuleContext) {}
240 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
241 deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
242 …deps.GeneratedSources = removeListFromList(deps.GeneratedSources, compiler.Properties.Exclude_gene…
243 deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...)
245 android.ProtoDeps(ctx, &compiler.Proto)
246 if compiler.hasSrcExt(".proto") {
247 deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
250 if Bool(compiler.Properties.Openmp) {
269 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags {
273compiler.srcsBeforeGen = android.PathsForModuleSrcExcludes(ctx, compiler.Properties.Srcs, compiler
274 compiler.srcsBeforeGen = append(compiler.srcsBeforeGen, deps.GeneratedSources...)
276 CheckBadCompilerFlags(ctx, "cflags", compiler.Properties.Cflags)
277 CheckBadCompilerFlags(ctx, "cppflags", compiler.Properties.Cppflags)
278 CheckBadCompilerFlags(ctx, "conlyflags", compiler.Properties.Conlyflags)
279 CheckBadCompilerFlags(ctx, "asflags", compiler.Properties.Asflags)
280 CheckBadCompilerFlags(ctx, "vendor.cflags", compiler.Properties.Target.Vendor.Cflags)
281 CheckBadCompilerFlags(ctx, "recovery.cflags", compiler.Properties.Target.Recovery.Cflags)
285 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Cflags)...)
286 flags.Local.CppFlags = append(flags.Local.CppFlags, esc(compiler.Properties.Cppflags)...)
287 flags.Local.ConlyFlags = append(flags.Local.ConlyFlags, esc(compiler.Properties.Conlyflags)...)
288 flags.Local.AsFlags = append(flags.Local.AsFlags, esc(compiler.Properties.Asflags)...)
289 flags.Local.YasmFlags = append(flags.Local.YasmFlags, esc(compiler.Properties.Asflags)...)
291 flags.Yacc = compiler.Properties.Yacc
294 localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs)
300 rootIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Include_dirs)
307 if compiler.Properties.Include_build_directory == nil ||
308 *compiler.Properties.Include_build_directory {
340 if Bool(compiler.Properties.Use_apex_name_macro) {
348 instructionSet := String(compiler.Properties.Instruction_set)
357 CheckBadCompilerFlags(ctx, "release.cflags", compiler.Properties.Release.Cflags)
360 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Release.Cflags)...)
362 CheckBadCompilerFlags(ctx, "clang_cflags", compiler.Properties.Clang_cflags)
363 CheckBadCompilerFlags(ctx, "clang_asflags", compiler.Properties.Clang_asflags)
366 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Clang_cflags)...)
367 flags.Local.AsFlags = append(flags.Local.AsFlags, esc(compiler.Properties.Clang_asflags)...)
409 if Bool(compiler.Properties.Rtti) {
425 if String(compiler.Properties.C_std) == "experimental" {
427 } else if String(compiler.Properties.C_std) != "" {
428 cStd = String(compiler.Properties.C_std)
431 cppStd := String(compiler.Properties.Cpp_std)
432 switch String(compiler.Properties.Cpp_std) {
439 if compiler.Properties.Gnu_extensions != nil && *compiler.Properties.Gnu_extensions == false {
448 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...)
452 …flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Recovery.Cflags)...)
471 if compiler.hasSrcExt(".proto") {
472 flags = protoFlags(ctx, flags, &compiler.Proto)
475 if compiler.hasSrcExt(".y") || compiler.hasSrcExt(".yy") {
480 if compiler.hasSrcExt(".mc") {
485 if compiler.hasSrcExt(".aidl") {
486 if len(compiler.Properties.Aidl.Local_include_dirs) > 0 {
487 …localAidlIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Aidl.Local_include_dirs)
490 if len(compiler.Properties.Aidl.Include_dirs) > 0 {
491 rootAidlIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Aidl.Include_dirs)
495 if Bool(compiler.Properties.Aidl.Generate_traces) {
503 if compiler.hasSrcExt(".rscript") || compiler.hasSrcExt(".fs") {
504 flags = rsFlags(ctx, flags, &compiler.Properties)
507 if compiler.hasSrcExt(".sysprop") {
512 if len(compiler.Properties.Srcs) > 0 {
526 if Bool(compiler.Properties.Openmp) {
539 func (compiler *baseCompiler) hasSrcExt(ext string) bool {
540 for _, src := range compiler.srcsBeforeGen {
545 for _, src := range compiler.Properties.Srcs {
550 for _, src := range compiler.Properties.OriginalSrcs {
576 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
582 srcs := append(android.Paths(nil), compiler.srcsBeforeGen...)
587 compiler.pathDeps = pathDeps
588 compiler.cFlagsDeps = flags.CFlagsDeps
591 compiler.srcs = srcs
594 objs := compileObjs(ctx, buildFlags, "", srcs, pathDeps, compiler.cFlagsDeps)