diff options
-rw-r--r-- | cc/config/clang.go | 15 | ||||
-rw-r--r-- | cc/config/global.go | 4 | ||||
-rw-r--r-- | cc/ndk_library.go | 1 | ||||
-rw-r--r-- | cc/xom.go | 5 | ||||
-rw-r--r-- | rust/config/arm64_device.go | 3 |
5 files changed, 24 insertions, 4 deletions
diff --git a/cc/config/clang.go b/cc/config/clang.go index eddc34104..8618d0955 100644 --- a/cc/config/clang.go +++ b/cc/config/clang.go @@ -132,6 +132,10 @@ func init() { // Disable -Winconsistent-missing-override until we can clean up the existing // codebase for it. "-Wno-inconsistent-missing-override", + + // Warnings from clang-10 + // Nested and array designated initialization is nice to have. + "-Wno-c99-designator", }, " ")) pctx.StaticVariable("ClangExtraCppflags", strings.Join([]string{ @@ -161,6 +165,10 @@ func init() { // new warnings are fixed. "-Wno-tautological-constant-compare", "-Wno-tautological-type-limit-compare", + // http://b/145210666 + "-Wno-reorder-init-list", + // http://b/145211066 + "-Wno-implicit-int-float-conversion", }, " ")) // Extra cflags for external third-party projects to disable warnings that @@ -176,6 +184,13 @@ func init() { // Bug: http://b/29823425 Disable -Wnull-dereference until the // new instances detected by this warning are fixed. "-Wno-null-dereference", + + // http://b/145211477 + "-Wno-pointer-compare", + // http://b/145211022 + "-Wno-xor-used-as-pow", + // http://b/145211022 + "-Wno-final-dtor-non-final-class", }, " ")) } diff --git a/cc/config/global.go b/cc/config/global.go index 0a09fa4e7..bae5555f9 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -126,8 +126,8 @@ var ( // prebuilts/clang default settings. ClangDefaultBase = "prebuilts/clang/host" - ClangDefaultVersion = "clang-r365631b" - ClangDefaultShortVersion = "9.0.7" + ClangDefaultVersion = "clang-r370808" + ClangDefaultShortVersion = "10.0.1" // Directories with warnings from Android.bp files. WarningAllowedProjects = []string{ diff --git a/cc/ndk_library.go b/cc/ndk_library.go index d5296222c..00338b953 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -261,6 +261,7 @@ func addStubLibraryCompilerFlags(flags Flags) Flags { // We're knowingly doing some otherwise unsightly things with builtin // functions here. We're just generating stub libraries, so ignore it. "-Wno-incompatible-library-redeclaration", + "-Wno-incomplete-setjmp-declaration", "-Wno-builtin-requires-header", "-Wno-invalid-noreturn", "-Wall", @@ -68,7 +68,10 @@ func (xom *xom) flags(ctx ModuleContext, flags Flags) Flags { if !disableXom || (xom.Properties.Xom != nil && *xom.Properties.Xom) { // XOM is only supported on AArch64 when using lld. if ctx.Arch().ArchType == android.Arm64 && ctx.useClangLld(ctx) { - flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-execute-only") + flags.Local.LdFlags = append(flags.Local.LdFlags, + "-Wl,--execute-only", + "-Wl,-z,separate-code", + ) } } diff --git a/rust/config/arm64_device.go b/rust/config/arm64_device.go index 0264052db..60796d8d8 100644 --- a/rust/config/arm64_device.go +++ b/rust/config/arm64_device.go @@ -27,7 +27,8 @@ var ( "-Wl,--icf=safe", "-Wl,-z,max-page-size=4096", - "-Wl,-execute-only", + "-Wl,--execute-only", + "-Wl,-z,separate-code", } Arm64ArchVariantRustFlags = map[string][]string{ |