[config] Suppress implicit fallthrough
Change-Id: If89c044abe89c9f7e82391dc0ca56c037b4f12e1
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/processor-trace/+/527278
Reviewed-by: Shai Barack <shayba@google.com>
diff --git a/libipt/BUILD.gn b/libipt/BUILD.gn
index 80cd023..8c15f6f 100644
--- a/libipt/BUILD.gn
+++ b/libipt/BUILD.gn
@@ -4,7 +4,10 @@
config("libipt_config") {
# Suppress warnings in upstream code that are triggered by Fuchsia compilation flags.
- cflags = [ "-Wno-conversion" ]
+ cflags = [
+ "-Wno-conversion",
+ "-Wno-implicit-fallthrough",
+ ]
visibility = [ ":*" ]
}
@@ -42,35 +45,36 @@
"internal/include/pti-imm.h",
"internal/include/pti-modrm-defs.h",
"internal/include/pti-modrm.h",
- "src/pt_section.c",
- "src/pt_section_file.c",
- "src/pt_error.c",
- "src/pt_packet_decoder.c",
- "src/pt_query_decoder.c",
+ "src/pt_asid.c",
+ "src/pt_block_cache.c",
+ "src/pt_block_decoder.c",
+ "src/pt_config.c",
+ "src/pt_decoder_function.c",
"src/pt_encoder.c",
- "src/pt_sync.c",
- "src/pt_version.c",
- "src/pt_last_ip.c",
- "src/pt_tnt_cache.c",
+ "src/pt_error.c",
+ "src/pt_event_queue.c",
"src/pt_ild.c",
"src/pt_image.c",
"src/pt_image_section_cache.c",
- "src/pt_retstack.c",
- "src/pt_insn_decoder.c",
- "src/pt_time.c",
- "src/pt_asid.c",
- "src/pt_event_queue.c",
- "src/pt_packet.c",
- "src/pt_decoder_function.c",
- "src/pt_config.c",
"src/pt_insn.c",
- "src/pt_block_decoder.c",
- "src/pt_block_cache.c",
+ "src/pt_insn_decoder.c",
+ "src/pt_last_ip.c",
+ "src/pt_packet.c",
+ "src/pt_packet_decoder.c",
+ "src/pt_query_decoder.c",
+ "src/pt_retstack.c",
+ "src/pt_section.c",
+ "src/pt_section_file.c",
+ "src/pt_sync.c",
+ "src/pt_time.c",
+ "src/pt_tnt_cache.c",
+ "src/pt_version.c",
]
if (is_linux || is_mac) {
sources += [
"internal/include/posix/pt_section_posix.h",
+
# IWBN to include init.c but we're building a static library,
# and thus it won't be brought in (nothing external references it).
#"src/posix/init.c",
@@ -79,8 +83,7 @@
]
}
- deps = [
- ]
+ deps = []
include_dirs = [
"include",
@@ -88,9 +91,7 @@
]
if (is_linux || is_mac) {
- include_dirs += [
- "internal/include/posix",
- ]
+ include_dirs += [ "internal/include/posix" ]
}
defines = [
@@ -98,6 +99,7 @@
"PT_VERSION_MINOR=6",
"PT_VERSION_BUILD=0",
"PT_VERSION_EXT=\"\"",
+
# This is a workaround to ensure posix/init.c is brought in by the linker.
# See pt_ild.c.
"INCLUDE_EARLY_INIT",