blob: ed1c3316a998d60c86a17a799ccdb1fd806c71e7 [file] [log] [blame]
[email protected]93c19fd22013-08-06 19:34:441# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
thakis29de2c82015-12-31 17:26:065config("libudis86_warnings") {
6 if (is_clang) {
7 cflags = [
8 # syn.c contains a switch with an assert(false) in a default:
9 # block. In release builds, the function is missing a return.
10 "-Wno-return-type",
11
12 # Fires once in decode.c.
13 "-Wno-sometimes-uninitialized",
14 ]
15 }
16}
17
[email protected]ebced5f2014-01-09 01:50:0118static_library("libudis86") {
[email protected]ebced5f2014-01-09 01:50:0119 sources = [
20 "libudis86/decode.c",
21 "libudis86/decode.h",
22 "libudis86/extern.h",
23 "libudis86/input.c",
24 "libudis86/input.h",
25 "libudis86/itab.c",
26 "libudis86/itab.h",
27 "libudis86/syn-att.c",
28 "libudis86/syn-intel.c",
29 "libudis86/syn.c",
30 "libudis86/syn.h",
31 "libudis86/types.h",
32 "libudis86/udint.h",
33 "libudis86/udis86.c",
34 "udis86.h",
35 ]
36 defines = [
37 "HAVE_ASSERT_H",
38 "HAVE_STRING_H",
39 ]
brettw0d939852014-09-17 00:00:0040
41 # syn.c doesn't specify a return value when it issues an assertion.
42 cflags = [ "-Wno-return-type" ]
43
44 configs -= [ "//build/config/compiler:chromium_code" ]
thakis29de2c82015-12-31 17:26:0645 configs += [
46 "//build/config/compiler:no_chromium_code",
47
48 # Must be after no_chromium_code for warning flags to be ordered correctly.
49 ":libudis86_warnings",
50 ]
hansa4057672014-12-09 03:33:4751
52 if (is_clang) {
53 # For UD_ASSERT(!"message");
54 configs -= [ "//build/config/clang:extra_warnings" ]
55 }
[email protected]ebced5f2014-01-09 01:50:0156}
57
[email protected]93c19fd22013-08-06 19:34:4458static_library("mach_override") {
[email protected]93c19fd22013-08-06 19:34:4459 sources = [
60 "mach_override.c",
61 "mach_override.h",
62 ]
[email protected]ebced5f2014-01-09 01:50:0163 deps = [
64 ":libudis86",
65 ]
[email protected]93c19fd22013-08-06 19:34:4466}