diff options
Diffstat (limited to 'rust/compiler.go')
-rw-r--r-- | rust/compiler.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index d6c52e8d4..6f61798be 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -328,12 +328,15 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag } if !ctx.toolchain().Bionic() && ctx.Os() != android.LinuxMusl && !ctx.Windows() { - // Add -ldl, -lpthread, -lm and -lrt to host builds to match the default behavior of device + // Add -lc, -lrt, -ldl, -lpthread, -lm, -lrt and -lgcc_s to host builds to match the default behavior of device // builds. This is irrelevant for the Windows target as these are Posix specific. flags.LinkFlags = append(flags.LinkFlags, + "-lc", + "-lrt", "-ldl", "-lpthread", "-lm", + "-lgcc_s", ) } return flags |