Lines Matching refs:compiler

35 func (compiler *baseCompiler) edition() string {
36 return proptools.StringDefault(compiler.Properties.Edition, config.DefaultEdition)
39 func (compiler *baseCompiler) setNoStdlibs() {
40 compiler.Properties.No_stdlibs = proptools.BoolPtr(true)
43 func (compiler *baseCompiler) disableLints() {
44 compiler.Properties.Lints = proptools.StringPtr("none")
179 func (compiler *baseCompiler) Disabled() bool {
183 func (compiler *baseCompiler) SetDisabled() {
187 func (compiler *baseCompiler) coverageOutputZipPath() android.OptionalPath {
191 func (compiler *baseCompiler) preferRlib() bool {
192 return Bool(compiler.Properties.Prefer_rlib)
195 func (compiler *baseCompiler) stdLinkage(ctx *depsContext) RustLinkage {
197 if compiler.preferRlib() {
206 var _ compiler = (*baseCompiler)(nil)
208 func (compiler *baseCompiler) inData() bool {
209 return compiler.location == InstallInData
212 func (compiler *baseCompiler) compilerProps() []interface{} {
213 return []interface{}{&compiler.Properties}
216 func (compiler *baseCompiler) cfgsToFlags() []string {
218 for _, cfg := range compiler.Properties.Cfgs {
224 func (compiler *baseCompiler) featuresToFlags() []string {
226 for _, feature := range compiler.Properties.Features {
232 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flags {
234 lintFlags, err := config.RustcLintsForDir(ctx.ModuleDir(), compiler.Properties.Lints)
239 flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...)
240 flags.RustFlags = append(flags.RustFlags, compiler.cfgsToFlags()...)
241 flags.RustFlags = append(flags.RustFlags, compiler.featuresToFlags()...)
242 flags.RustdocFlags = append(flags.RustdocFlags, compiler.cfgsToFlags()...)
243 flags.RustdocFlags = append(flags.RustdocFlags, compiler.featuresToFlags()...)
244 flags.RustFlags = append(flags.RustFlags, "--edition="+compiler.edition())
245 flags.RustdocFlags = append(flags.RustdocFlags, "--edition="+compiler.edition())
246 flags.LinkFlags = append(flags.LinkFlags, compiler.Properties.Ld_flags...)
274 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path {
278 func (compiler *baseCompiler) rustdoc(ctx ModuleContext, flags Flags,
284 func (compiler *baseCompiler) initialize(ctx ModuleContext) {
285 compiler.cargoOutDir = android.PathForModuleOut(ctx, genSubDir)
288 func (compiler *baseCompiler) CargoOutDir() android.OptionalPath {
289 return android.OptionalPathForPath(compiler.cargoOutDir)
292 func (compiler *baseCompiler) isDependencyRoot() bool {
296 func (compiler *baseCompiler) strippedOutputFilePath() android.OptionalPath {
297 return compiler.strippedOutputFile
300 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
301 deps.Rlibs = append(deps.Rlibs, compiler.Properties.Rlibs...)
302 deps.Dylibs = append(deps.Dylibs, compiler.Properties.Dylibs...)
303 deps.Rustlibs = append(deps.Rustlibs, compiler.Properties.Rustlibs...)
304 deps.ProcMacros = append(deps.ProcMacros, compiler.Properties.Proc_macros...)
305 deps.StaticLibs = append(deps.StaticLibs, compiler.Properties.Static_libs...)
306 deps.WholeStaticLibs = append(deps.WholeStaticLibs, compiler.Properties.Whole_static_libs...)
307 deps.SharedLibs = append(deps.SharedLibs, compiler.Properties.Shared_libs...)
309 if !Bool(compiler.Properties.No_stdlibs) {
340 func (compiler *baseCompiler) crateName() string {
341 return compiler.Properties.Crate_name
344 func (compiler *baseCompiler) everInstallable() bool {
349 func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath {
350 dir := compiler.dir
351 if ctx.toolchain().Is64Bit() && compiler.dir64 != "" {
352 dir = compiler.dir64
361 if compiler.location == InstallInData && ctx.RustModule().UseVndk() {
364 return android.PathForModuleInstall(ctx, dir, compiler.subDir,
365 compiler.relativeInstallPath(), compiler.relative)
368 func (compiler *baseCompiler) nativeCoverage() bool {
372 func (compiler *baseCompiler) install(ctx ModuleContext) {
374 compiler.path = ctx.InstallFile(compiler.installDir(ctx), path.Path().Base(), path.Path())
377 func (compiler *baseCompiler) getStem(ctx ModuleContext) string {
378 return compiler.getStemWithoutSuffix(ctx) + String(compiler.Properties.Suffix)
381 func (compiler *baseCompiler) getStemWithoutSuffix(ctx BaseModuleContext) string {
383 if String(compiler.Properties.Stem) != "" {
384 stem = String(compiler.Properties.Stem)
390 func (compiler *baseCompiler) relativeInstallPath() string {
391 return String(compiler.Properties.Relative_install_path)