Lines Matching refs:compiler

237 var _ compiler = (*baseCompiler)(nil)
243 func (compiler *baseCompiler) Srcs() android.Paths {
244 return append(android.Paths{}, compiler.srcs...)
247 func (compiler *baseCompiler) appendCflags(flags []string) {
248 compiler.Properties.Cflags = append(compiler.Properties.Cflags, flags...)
251 func (compiler *baseCompiler) appendAsflags(flags []string) {
252 compiler.Properties.Asflags = append(compiler.Properties.Asflags, flags...)
255 func (compiler *baseCompiler) compilerProps() []interface{} {
256 return []interface{}{&compiler.Properties, &compiler.Proto}
259 func (compiler *baseCompiler) includeBuildDirectory() bool {
260 return proptools.BoolDefault(compiler.Properties.Include_build_directory, true)
263 func (compiler *baseCompiler) compilerInit(ctx BaseModuleContext) {}
265 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
266 deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
267 …deps.GeneratedSources = removeListFromList(deps.GeneratedSources, compiler.Properties.Exclude_gene…
268 deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...)
270 android.ProtoDeps(ctx, &compiler.Proto)
271 if compiler.hasSrcExt(".proto") {
272 deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
275 if Bool(compiler.Properties.Openmp) {
282 func (compiler *baseCompiler) useApexNameMacro() bool {
283 return Bool(compiler.Properties.Use_apex_name_macro) || compiler.Properties.UseApexNameMacro
298 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags {
302compiler.srcsBeforeGen = android.PathsForModuleSrcExcludes(ctx, compiler.Properties.Srcs, compiler
303 compiler.srcsBeforeGen = append(compiler.srcsBeforeGen, deps.GeneratedSources...)
305 CheckBadCompilerFlags(ctx, "cflags", compiler.Properties.Cflags)
306 CheckBadCompilerFlags(ctx, "cppflags", compiler.Properties.Cppflags)
307 CheckBadCompilerFlags(ctx, "conlyflags", compiler.Properties.Conlyflags)
308 CheckBadCompilerFlags(ctx, "asflags", compiler.Properties.Asflags)
309 CheckBadCompilerFlags(ctx, "vendor.cflags", compiler.Properties.Target.Vendor.Cflags)
310 CheckBadCompilerFlags(ctx, "product.cflags", compiler.Properties.Target.Product.Cflags)
311 CheckBadCompilerFlags(ctx, "recovery.cflags", compiler.Properties.Target.Recovery.Cflags)
312 …CheckBadCompilerFlags(ctx, "vendor_ramdisk.cflags", compiler.Properties.Target.Vendor_ramdisk.Cfla…
316 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Cflags)...)
317 flags.Local.CppFlags = append(flags.Local.CppFlags, esc(compiler.Properties.Cppflags)...)
318 flags.Local.ConlyFlags = append(flags.Local.ConlyFlags, esc(compiler.Properties.Conlyflags)...)
319 flags.Local.AsFlags = append(flags.Local.AsFlags, esc(compiler.Properties.Asflags)...)
320 flags.Local.YasmFlags = append(flags.Local.YasmFlags, esc(compiler.Properties.Asflags)...)
322 flags.Yacc = compiler.Properties.Yacc
323 flags.Lex = compiler.Properties.Lex
326 localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs)
332 rootIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Include_dirs)
339 if compiler.includeBuildDirectory() {
376 if compiler.useApexNameMacro() {
391 instructionSet := String(compiler.Properties.Instruction_set)
400 CheckBadCompilerFlags(ctx, "release.cflags", compiler.Properties.Release.Cflags)
403 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Release.Cflags)...)
405 CheckBadCompilerFlags(ctx, "clang_cflags", compiler.Properties.Clang_cflags)
406 CheckBadCompilerFlags(ctx, "clang_asflags", compiler.Properties.Clang_asflags)
409 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Clang_cflags)...)
410 flags.Local.AsFlags = append(flags.Local.AsFlags, esc(compiler.Properties.Clang_asflags)...)
452 if Bool(compiler.Properties.Rtti) {
468 if String(compiler.Properties.C_std) == "experimental" {
470 } else if String(compiler.Properties.C_std) != "" {
471 cStd = String(compiler.Properties.C_std)
474 cppStd := String(compiler.Properties.Cpp_std)
475 switch String(compiler.Properties.Cpp_std) {
482 if compiler.Properties.Gnu_extensions != nil && *compiler.Properties.Gnu_extensions == false {
491 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...)
495 flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Product.Cflags)...)
499 …flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Recovery.Cflags)...)
503 …flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Vendor_ramdisk.Cfla…
522 if compiler.hasSrcExt(".proto") {
523 flags = protoFlags(ctx, flags, &compiler.Proto)
526 if compiler.hasSrcExt(".y") || compiler.hasSrcExt(".yy") {
531 if compiler.hasSrcExt(".mc") {
536 if compiler.hasSrcExt(".aidl") {
537 flags.aidlFlags = append(flags.aidlFlags, compiler.Properties.Aidl.Flags...)
538 if len(compiler.Properties.Aidl.Local_include_dirs) > 0 {
539 …localAidlIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Aidl.Local_include_dirs)
542 if len(compiler.Properties.Aidl.Include_dirs) > 0 {
543 rootAidlIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Aidl.Include_dirs)
547 if Bool(compiler.Properties.Aidl.Generate_traces) {
555 if compiler.hasSrcExt(".rscript") || compiler.hasSrcExt(".fs") {
556 flags = rsFlags(ctx, flags, &compiler.Properties)
559 if compiler.hasSrcExt(".sysprop") {
564 if len(compiler.Properties.Srcs) > 0 {
578 if Bool(compiler.Properties.Openmp) {
591 func (compiler *baseCompiler) hasSrcExt(ext string) bool {
592 for _, src := range compiler.srcsBeforeGen {
597 for _, src := range compiler.Properties.Srcs {
602 for _, src := range compiler.Properties.OriginalSrcs {
611 func (compiler *baseCompiler) uniqueApexVariations() bool {
612 return compiler.useApexNameMacro()
634 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
640 srcs := append(android.Paths(nil), compiler.srcsBeforeGen...)
645 compiler.pathDeps = pathDeps
646 compiler.generatedSourceInfo = info
647 compiler.cFlagsDeps = flags.CFlagsDeps
650 compiler.srcs = srcs
653 objs := compileObjs(ctx, buildFlags, "", srcs, pathDeps, compiler.cFlagsDeps)