diff options
| author | 2020-08-03 18:28:43 +0000 | |
|---|---|---|
| committer | 2020-08-03 18:28:43 +0000 | |
| commit | 0d333752cfe330e90a00f01356f393b6b4069547 (patch) | |
| tree | eada57d656e1fe297945807a8cdc9559109db90c /rust/compiler.go | |
| parent | b4bfd148eb47a4c07d4ea9654ac4123fb8b5fa66 (diff) | |
| parent | e81c924f0c70b07fdfac86ef1475622ee6444c36 (diff) | |
Merge "Move getEdition to a baseCompiler method"
Diffstat (limited to 'rust/compiler.go')
| -rw-r--r-- | rust/compiler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 040219dc4..83a1f27cc 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -24,7 +24,7 @@ import ( "android/soong/rust/config" ) -func getEdition(compiler *baseCompiler) string { +func (compiler *baseCompiler) edition() string { return proptools.StringDefault(compiler.Properties.Edition, config.DefaultEdition) } @@ -149,7 +149,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag } flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...) flags.RustFlags = append(flags.RustFlags, compiler.featuresToFlags(compiler.Properties.Features)...) - flags.RustFlags = append(flags.RustFlags, "--edition="+getEdition(compiler)) + flags.RustFlags = append(flags.RustFlags, "--edition="+compiler.edition()) flags.LinkFlags = append(flags.LinkFlags, compiler.Properties.Ld_flags...) flags.GlobalRustFlags = append(flags.GlobalRustFlags, config.GlobalRustFlags...) flags.GlobalRustFlags = append(flags.GlobalRustFlags, ctx.toolchain().ToolchainRustFlags()) |