Commit 1fd1056d authored by JunHo Seo's avatar JunHo Seo Committed by Commit Bot

Suppress -Wpacked-not-aligned compile warning for noclang and nowin build.

A huge(tested on downstream build - chromium68 with gcc 8.2,
about 180MB) compile warning messages are printed during
building chromium. One of major warning messages is about
the -Wpacked-not-aligned warning message. The type of warning
is printed for all generated mojom-shared-internal.h files.
But all the warnings are false positive because we are checking
the correctness by inserting static_asserts(structure size ==
mojo::internal::kUnionDataSize).
To reduce printing too many warnings, suppress the build flag
for (!clang and !win) build.

Below is a sample message:
gen/third_party/blink/public/mojom/blob/data_element.mojom-shared-internal.h:39:7
warning: alignment 1 of 'blink::mojom::internal::DataElement_Data'
is less than 8 [-Wpacked-not-aligned]

Bug: 819294
Change-Id: Idcb711f6218e00f0450a4c9714dd70dda802ecc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637022Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: JunHo Seo <junho0924.seo@lge.com>
Cr-Commit-Position: refs/heads/master@{#664998}
parent 2f882a6a
......@@ -1445,6 +1445,10 @@ config("default_warnings") {
# comments
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
cflags += [ "-Wno-comments" ]
# -Wpacked-not-aligned complains all generated mojom-shared-internal.h
# files.
cflags += [ "-Wno-packed-not-aligned" ]
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment