• Home
  • Raw
  • Download

Lines Matching refs:compiler

36 func (compiler *baseCompiler) edition() string {
37 return proptools.StringDefault(compiler.Properties.Edition, config.DefaultEdition)
40 func (compiler *baseCompiler) setNoStdlibs() {
41 compiler.Properties.No_stdlibs = proptools.BoolPtr(true)
44 func (compiler *baseCompiler) disableLints() {
45 compiler.Properties.Lints = proptools.StringPtr("none")
202 func (compiler *baseCompiler) Disabled() bool {
206 func (compiler *baseCompiler) SetDisabled() {
210 func (compiler *baseCompiler) coverageOutputZipPath() android.OptionalPath {
214 func (compiler *baseCompiler) preferRlib() bool {
215 return Bool(compiler.Properties.Prefer_rlib)
218 func (compiler *baseCompiler) stdLinkage(ctx *depsContext) RustLinkage {
220 if compiler.preferRlib() {
229 var _ compiler = (*baseCompiler)(nil)
231 func (compiler *baseCompiler) inData() bool {
232 return compiler.location == InstallInData
235 func (compiler *baseCompiler) compilerProps() []interface{} {
236 return []interface{}{&compiler.Properties}
239 func (compiler *baseCompiler) cfgsToFlags() []string {
241 for _, cfg := range compiler.Properties.Cfgs {
248 func (compiler *baseCompiler) featuresToFlags() []string {
250 for _, feature := range compiler.Properties.Features {
257 func (compiler *baseCompiler) featureFlags(ctx ModuleContext, flags Flags) Flags {
258 flags.RustFlags = append(flags.RustFlags, compiler.featuresToFlags()...)
259 flags.RustdocFlags = append(flags.RustdocFlags, compiler.featuresToFlags()...)
264 func (compiler *baseCompiler) cfgFlags(ctx ModuleContext, flags Flags) Flags {
266 compiler.Properties.Cfgs = append(compiler.Properties.Cfgs, "android_vndk")
269 flags.RustFlags = append(flags.RustFlags, compiler.cfgsToFlags()...)
270 flags.RustdocFlags = append(flags.RustdocFlags, compiler.cfgsToFlags()...)
274 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flags {
276 lintFlags, err := config.RustcLintsForDir(ctx.ModuleDir(), compiler.Properties.Lints)
282 for _, s := range compiler.Properties.Ld_flags {
287 for _, s := range compiler.Properties.Flags {
300 flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...)
301 flags.RustFlags = append(flags.RustFlags, "--edition="+compiler.edition())
302 flags.RustdocFlags = append(flags.RustdocFlags, "--edition="+compiler.edition())
303 flags.LinkFlags = append(flags.LinkFlags, compiler.Properties.Ld_flags...)
327 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path {
331 func (compiler *baseCompiler) rustdoc(ctx ModuleContext, flags Flags,
337 func (compiler *baseCompiler) initialize(ctx ModuleContext) {
338 compiler.cargoOutDir = android.PathForModuleOut(ctx, genSubDir)
341 func (compiler *baseCompiler) CargoOutDir() android.OptionalPath {
342 return android.OptionalPathForPath(compiler.cargoOutDir)
345 func (compiler *baseCompiler) CargoEnvCompat() bool {
346 return Bool(compiler.Properties.Cargo_env_compat)
349 func (compiler *baseCompiler) CargoPkgVersion() string {
350 return String(compiler.Properties.Cargo_pkg_version)
353 func (compiler *baseCompiler) unstrippedOutputFilePath() android.Path {
354 return compiler.unstrippedOutputFile
357 func (compiler *baseCompiler) strippedOutputFilePath() android.OptionalPath {
358 return compiler.strippedOutputFile
361 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
362 deps.Rlibs = append(deps.Rlibs, compiler.Properties.Rlibs...)
363 deps.Dylibs = append(deps.Dylibs, compiler.Properties.Dylibs...)
364 deps.Rustlibs = append(deps.Rustlibs, compiler.Properties.Rustlibs...)
365 deps.ProcMacros = append(deps.ProcMacros, compiler.Properties.Proc_macros...)
366 deps.StaticLibs = append(deps.StaticLibs, compiler.Properties.Static_libs...)
367 deps.WholeStaticLibs = append(deps.WholeStaticLibs, compiler.Properties.Whole_static_libs...)
368 deps.SharedLibs = append(deps.SharedLibs, compiler.Properties.Shared_libs...)
369 deps.Stdlibs = append(deps.Stdlibs, compiler.Properties.Stdlibs...)
371 if !Bool(compiler.Properties.No_stdlibs) {
418 func (compiler *baseCompiler) crateName() string {
419 return compiler.Properties.Crate_name
422 func (compiler *baseCompiler) everInstallable() bool {
427 func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath {
428 dir := compiler.dir
429 if ctx.toolchain().Is64Bit() && compiler.dir64 != "" {
430 dir = compiler.dir64
439 if compiler.location == InstallInData && ctx.RustModule().UseVndk() {
449 return android.PathForModuleInstall(ctx, dir, compiler.subDir,
450 compiler.relativeInstallPath(), compiler.relative)
453 func (compiler *baseCompiler) nativeCoverage() bool {
457 func (compiler *baseCompiler) install(ctx ModuleContext) {
459 compiler.path = ctx.InstallFile(compiler.installDir(ctx), path.Path().Base(), path.Path())
462 func (compiler *baseCompiler) getStem(ctx ModuleContext) string {
463 return compiler.getStemWithoutSuffix(ctx) + String(compiler.Properties.Suffix)
466 func (compiler *baseCompiler) getStemWithoutSuffix(ctx BaseModuleContext) string {
468 if String(compiler.Properties.Stem) != "" {
469 stem = String(compiler.Properties.Stem)
475 func (compiler *baseCompiler) relativeInstallPath() string {
476 return String(compiler.Properties.Relative_install_path)