Lines Matching full:compiler
187 // Sources that were passed to the C/C++ compiler
196 var _ compiler = (*baseCompiler)(nil)
202 func (compiler *baseCompiler) Srcs() android.Paths {
203 return append(android.Paths{}, compiler.srcs...)
206 func (compiler *baseCompiler) appendCflags(flags []string) {
207 compiler.Properties.Cflags = append(compiler.Properties.Cflags, flags...)
210 func (compiler *baseCompiler) appendAsflags(flags []string) {
211 compiler.Properties.Asflags = append(compiler.Properties.Asflags, flags...)
214 func (compiler *baseCompiler) compilerProps() []interface{} {
215 return []interface{}{&compiler.Properties, &compiler.Proto}
218 func (compiler *baseCompiler) compilerInit(ctx BaseModuleContext) {}
220 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
221 deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
222 deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...)
224 android.ProtoDeps(ctx, &compiler.Proto)
225 if compiler.hasSrcExt(".proto") {
226 deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
229 if compiler.hasSrcExt(".sysprop") {
234 if Bool(compiler.Properties.Openmp) {
258 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags {
261 …compiler.srcsBeforeGen = android.PathsForModuleSrcExcludes(ctx, compiler.Properties.Srcs, compiler…
262 compiler.srcsBeforeGen = append(compiler.srcsBeforeGen, deps.GeneratedSources...)
264 CheckBadCompilerFlags(ctx, "cflags", compiler.Properties.Cflags)
265 CheckBadCompilerFlags(ctx, "cppflags", compiler.Properties.Cppflags)
266 CheckBadCompilerFlags(ctx, "conlyflags", compiler.Properties.Conlyflags)
267 CheckBadCompilerFlags(ctx, "asflags", compiler.Properties.Asflags)
268 CheckBadCompilerFlags(ctx, "vendor.cflags", compiler.Properties.Target.Vendor.Cflags)
269 CheckBadCompilerFlags(ctx, "recovery.cflags", compiler.Properties.Target.Recovery.Cflags)
273 flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Cflags)...)
274 flags.CppFlags = append(flags.CppFlags, esc(compiler.Properties.Cppflags)...)
275 flags.ConlyFlags = append(flags.ConlyFlags, esc(compiler.Properties.Conlyflags)...)
276 flags.AsFlags = append(flags.AsFlags, esc(compiler.Properties.Asflags)...)
277 flags.YasmFlags = append(flags.YasmFlags, esc(compiler.Properties.Asflags)...)
278 flags.YaccFlags = append(flags.YaccFlags, esc(compiler.Properties.Yaccflags)...)
281 localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs)
287 rootIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Include_dirs)
294 if compiler.Properties.Include_build_directory == nil ||
295 *compiler.Properties.Include_build_directory {
347 instructionSet := String(compiler.Properties.Instruction_set)
356 CheckBadCompilerFlags(ctx, "release.cflags", compiler.Properties.Release.Cflags)
359 flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Release.Cflags)...)
361 CheckBadCompilerFlags(ctx, "clang_cflags", compiler.Properties.Clang_cflags)
362 CheckBadCompilerFlags(ctx, "clang_asflags", compiler.Properties.Clang_asflags)
365 flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Clang_cflags)...)
366 flags.AsFlags = append(flags.AsFlags, esc(compiler.Properties.Clang_asflags)...)
399 if Bool(compiler.Properties.Rtti) {
415 if String(compiler.Properties.C_std) == "experimental" {
417 } else if String(compiler.Properties.C_std) != "" {
418 cStd = String(compiler.Properties.C_std)
421 cppStd := String(compiler.Properties.Cpp_std)
422 switch String(compiler.Properties.Cpp_std) {
429 if compiler.Properties.Gnu_extensions != nil && *compiler.Properties.Gnu_extensions == false {
438 flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...)
442 flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Recovery.Cflags)...)
461 if compiler.hasSrcExt(".proto") {
462 flags = protoFlags(ctx, flags, &compiler.Proto)
465 if compiler.hasSrcExt(".y") || compiler.hasSrcExt(".yy") {
470 if compiler.hasSrcExt(".mc") {
475 if compiler.hasSrcExt(".aidl") {
476 if len(compiler.Properties.Aidl.Local_include_dirs) > 0 {
477 …localAidlIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Aidl.Local_include_dirs)
480 if len(compiler.Properties.Aidl.Include_dirs) > 0 {
481 rootAidlIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Aidl.Include_dirs)
485 if Bool(compiler.Properties.Aidl.Generate_traces) {
493 if compiler.hasSrcExt(".rs") || compiler.hasSrcExt(".fs") {
494 flags = rsFlags(ctx, flags, &compiler.Properties)
497 if compiler.hasSrcExt(".sysprop") {
502 if len(compiler.Properties.Srcs) > 0 {
516 if Bool(compiler.Properties.Openmp) {
523 func (compiler *baseCompiler) hasSrcExt(ext string) bool {
524 for _, src := range compiler.srcsBeforeGen {
529 for _, src := range compiler.Properties.Srcs {
534 for _, src := range compiler.Properties.OriginalSrcs {
554 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
560 srcs := append(android.Paths(nil), compiler.srcsBeforeGen...)
565 compiler.pathDeps = pathDeps
566 compiler.cFlagsDeps = flags.CFlagsDeps
569 compiler.srcs = srcs
572 objs := compileObjs(ctx, buildFlags, "", srcs, pathDeps, compiler.cFlagsDeps)