diff options
Diffstat (limited to 'rust/compiler.go')
| -rw-r--r-- | rust/compiler.go | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 6055158ec..31acd49cb 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -15,6 +15,7 @@ package rust import ( + "android/soong/cc" "fmt" "path/filepath" "strings" @@ -207,6 +208,10 @@ func (compiler *baseCompiler) SetDisabled() { panic("baseCompiler does not implement SetDisabled()") } +func (compiler *baseCompiler) noStdlibs() bool { + return Bool(compiler.Properties.No_stdlibs) +} + func (compiler *baseCompiler) coverageOutputZipPath() android.OptionalPath { panic("baseCompiler does not implement coverageOutputZipPath()") } @@ -307,19 +312,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag flags.EmitXrefs = ctx.Config().EmitXrefRules() if ctx.Host() && !ctx.Windows() { - rpathPrefix := `\$$ORIGIN/` - if ctx.Darwin() { - rpathPrefix = "@loader_path/" - } - - var rpath string - if ctx.toolchain().Is64Bit() { - rpath = "lib64" - } else { - rpath = "lib" - } - flags.LinkFlags = append(flags.LinkFlags, "-Wl,-rpath,"+rpathPrefix+rpath) - flags.LinkFlags = append(flags.LinkFlags, "-Wl,-rpath,"+rpathPrefix+"../"+rpath) + flags.LinkFlags = append(flags.LinkFlags, cc.RpathFlags(ctx)...) } return flags |