summaryrefslogtreecommitdiffstats
path: root/third_party/dmg_fp/dmg_fp.scons
blob: 8ac9cba7a11f1775f3ac9371bbcdec930e21e756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (c) 2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Import('env')

env = env.Clone()

# Do *NOT* define USE_LOCALE here. We want these functions to be
# locale-independent, for example to use in parsers or serializers.
env.Append(
    # TODO(sgk): Review this when we want to support more architectures.
    CPPDEFINES = [
        'IEEE_8087',
    ],
)

if env['PLATFORM'] == 'win32':
  env.Append(
      CCFLAGS = [
          '/TP',

          '/wd4018',
          '/wd4102',
          '/wd4244',
          '/wd4503',
          '/wd4554',
          '/wd4800',
          '/wd4819',
      ],
  )

if env['PLATFORM'] in ('darwin', 'posix'):
  # As usual with third party code, it generates lots of warnings.
  # Disable only what's necessary.
  env.Append(
      CCFLAGS = [
          '-Wno-uninitialized',
          '-Wno-parentheses',
          '-Wno-sign-compare',
          '-Wno-unused-label',
          '-Wno-write-strings',
      ]
  )

input_files = [
    'dtoa.cc',
    'g_fmt.cc',
]

env.ChromeStaticLibrary('dmg_fp', input_files)