aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/config/global.go1
-rw-r--r--cc/stl.go5
2 files changed, 5 insertions, 1 deletions
diff --git a/cc/config/global.go b/cc/config/global.go
index 372ffc47..07ef9d00 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -83,6 +83,7 @@ var (
"-Wl,--warn-shared-textrel",
"-Wl,--fatal-warnings",
"-Wl,--no-undefined-version",
+ "-Wl,--exclude-libs,libgcc.a",
}
deviceGlobalLldflags = append(ClangFilterUnknownLldflags(deviceGlobalLdflags),
diff --git a/cc/stl.go b/cc/stl.go
index e59f6776..1a5dd79c 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -245,7 +245,10 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include")
flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String())
case "ndk_libc++_shared", "ndk_libc++_static":
- // Nothing.
+ if ctx.Arch().ArchType == android.Arm {
+ // Make sure the _Unwind_XXX symbols are not re-exported.
+ flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs,libunwind.a")
+ }
case "":
// None or error.
if !ctx.toolchain().Bionic() {