[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 1 | # 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 | |
thakis | 87ec0f76f | 2016-01-04 20:10:36 | [diff] [blame^] | 5 | assert(is_mac || is_ios) |
thakis | 29de2c8 | 2015-12-31 17:26:06 | [diff] [blame] | 6 | |
thakis | 87ec0f76f | 2016-01-04 20:10:36 | [diff] [blame^] | 7 | config("libudis86_warnings") { |
| 8 | cflags = [ |
| 9 | # syn.c contains a switch with an assert(false) in a default: |
| 10 | # block. In release builds, the function is missing a return. |
| 11 | "-Wno-return-type", |
| 12 | |
| 13 | # Fires once in decode.c. |
| 14 | "-Wno-sometimes-uninitialized", |
| 15 | ] |
thakis | 29de2c8 | 2015-12-31 17:26:06 | [diff] [blame] | 16 | } |
| 17 | |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 18 | static_library("libudis86") { |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 19 | 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 | ] |
brettw | 0d93985 | 2014-09-17 00:00:00 | [diff] [blame] | 40 | |
thakis | 87ec0f76f | 2016-01-04 20:10:36 | [diff] [blame^] | 41 | configs -= [ |
| 42 | "//build/config/compiler:chromium_code", |
brettw | 0d93985 | 2014-09-17 00:00:00 | [diff] [blame] | 43 | |
thakis | 87ec0f76f | 2016-01-04 20:10:36 | [diff] [blame^] | 44 | # For UD_ASSERT(!"message"); |
| 45 | "//build/config/clang:extra_warnings", |
| 46 | ] |
thakis | 29de2c8 | 2015-12-31 17:26:06 | [diff] [blame] | 47 | configs += [ |
| 48 | "//build/config/compiler:no_chromium_code", |
| 49 | |
| 50 | # Must be after no_chromium_code for warning flags to be ordered correctly. |
| 51 | ":libudis86_warnings", |
| 52 | ] |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 53 | } |
| 54 | |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 55 | static_library("mach_override") { |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 56 | sources = [ |
| 57 | "mach_override.c", |
| 58 | "mach_override.h", |
| 59 | ] |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 60 | deps = [ |
| 61 | ":libudis86", |
| 62 | ] |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 63 | } |