Lines Matching refs:compiler

27 func getEdition(compiler *baseCompiler) string {
28 return proptools.StringDefault(compiler.Properties.Edition, config.DefaultEdition)
31 func (compiler *baseCompiler) setNoStdlibs() {
32 compiler.Properties.No_stdlibs = proptools.BoolPtr(true)
123 func (compiler *baseCompiler) coverageOutputZipPath() android.OptionalPath {
127 var _ compiler = (*baseCompiler)(nil)
129 func (compiler *baseCompiler) inData() bool {
130 return compiler.location == InstallInData
133 func (compiler *baseCompiler) compilerProps() []interface{} {
134 return []interface{}{&compiler.Properties}
137 func (compiler *baseCompiler) featuresToFlags(features []string) []string {
145 func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flags {
147 if !Bool(compiler.Properties.No_lint) {
150 flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...)
151 …flags.RustFlags = append(flags.RustFlags, compiler.featuresToFlags(compiler.Properties.Features)..…
152 flags.RustFlags = append(flags.RustFlags, "--edition="+getEdition(compiler))
153 flags.LinkFlags = append(flags.LinkFlags, compiler.Properties.Ld_flags...)
177 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path {
181 func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
182 deps.Rlibs = append(deps.Rlibs, compiler.Properties.Rlibs...)
183 deps.Dylibs = append(deps.Dylibs, compiler.Properties.Dylibs...)
184 deps.Rustlibs = append(deps.Rustlibs, compiler.Properties.Rustlibs...)
185 deps.ProcMacros = append(deps.ProcMacros, compiler.Properties.Proc_macros...)
186 deps.StaticLibs = append(deps.StaticLibs, compiler.Properties.Static_libs...)
187 deps.SharedLibs = append(deps.SharedLibs, compiler.Properties.Shared_libs...)
189 if !Bool(compiler.Properties.No_stdlibs) {
214 func (compiler *baseCompiler) crateName() string {
215 return compiler.Properties.Crate_name
218 func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath {
219 dir := compiler.dir
220 if ctx.toolchain().Is64Bit() && compiler.dir64 != "" {
221 dir = compiler.dir64
229 return android.PathForModuleInstall(ctx, dir, compiler.subDir,
230 compiler.relativeInstallPath(), compiler.relative)
233 func (compiler *baseCompiler) nativeCoverage() bool {
237 func (compiler *baseCompiler) install(ctx ModuleContext, file android.Path) {
238 compiler.path = ctx.InstallFile(compiler.installDir(ctx), file.Base(), file)
241 func (compiler *baseCompiler) getStem(ctx ModuleContext) string {
242 return compiler.getStemWithoutSuffix(ctx) + String(compiler.Properties.Suffix)
245 func (compiler *baseCompiler) getStemWithoutSuffix(ctx BaseModuleContext) string {
247 if String(compiler.Properties.Stem) != "" {
248 stem = String(compiler.Properties.Stem)
254 func (compiler *baseCompiler) relativeInstallPath() string {
255 return String(compiler.Properties.Relative_install_path)