blob: 0417950ae5b0342642467287db5605bca1360f33 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("libipt") {
sources = [
"include/intel-pt.h",
"internal/include/pt_asid.h",
"internal/include/pt_block_cache.h",
"internal/include/pt_block_decoder.h",
"internal/include/pt_config.h",
"internal/include/pt_cpu.h",
"internal/include/pt_cpuid.h",
"internal/include/pt_decoder_function.h",
"internal/include/pt_encoder.h",
"internal/include/pt_event_queue.h",
"internal/include/pt_ild.h",
"internal/include/pt_image.h",
"internal/include/pt_image_section_cache.h",
"internal/include/pt_insn.h",
"internal/include/pt_insn_decoder.h",
"internal/include/pt_last_ip.h",
"internal/include/pt_mapped_section.h",
"internal/include/pt_packet.h",
"internal/include/pt_packet_decoder.h",
"internal/include/pt_query_decoder.h",
"internal/include/pt_retstack.h",
"internal/include/pt_section.h",
"internal/include/pt_section_file.h",
"internal/include/pt_sync.h",
"internal/include/pt_time.h",
"internal/include/pt_tnt_cache.h",
"internal/include/pti-disp-defs.h",
"internal/include/pti-disp.h",
"internal/include/pti-imm-defs.h",
"internal/include/pti-imm.h",
"internal/include/pti-modrm-defs.h",
"internal/include/pti-modrm.h",
"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_error.c",
"src/pt_event_queue.c",
"src/pt_ild.c",
"src/pt_image.c",
"src/pt_image_section_cache.c",
"src/pt_insn.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",
"src/posix/pt_cpuid.c",
"src/posix/pt_section_posix.c",
]
}
deps = []
include_dirs = [
"include",
"internal/include",
]
if (is_linux || is_mac) {
include_dirs += [ "internal/include/posix" ]
}
defines = [
"PT_VERSION_MAJOR=1",
"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",
]
# Suppress warnings in upstream code that are triggered by Fuchsia compilation flags.
cflags = [
"-Wno-conversion",
"-Wno-implicit-fallthrough",
"-Wno-strict-prototypes",
]
}