[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 | 29de2c8 | 2015-12-31 17:26:06 | [diff] [blame] | 5 | config("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] | 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 | |
| 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" ] |
thakis | 29de2c8 | 2015-12-31 17:26:06 | [diff] [blame] | 45 | 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 | ] |
hans | a405767 | 2014-12-09 03:33:47 | [diff] [blame] | 51 | |
| 52 | if (is_clang) { |
| 53 | # For UD_ASSERT(!"message"); |
| 54 | configs -= [ "//build/config/clang:extra_warnings" ] |
| 55 | } |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 56 | } |
| 57 | |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 58 | static_library("mach_override") { |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 59 | sources = [ |
| 60 | "mach_override.c", |
| 61 | "mach_override.h", |
| 62 | ] |
[email protected] | ebced5f | 2014-01-09 01:50:01 | [diff] [blame] | 63 | deps = [ |
| 64 | ":libudis86", |
| 65 | ] |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 66 | } |