Skip to content

Commit

Permalink
Bug 933257 - Part 3: Add build scripts for fdlibm. r=jwalden
Browse files Browse the repository at this point in the history
  • Loading branch information
arai-a committed Nov 18, 2015
1 parent cbfb5c7 commit 8eb6e36
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/external/fdlibm/moz.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Library('fdlibm')

with Files('**'):
BUG_COMPONENT = ('Core', 'JavaScript Engine')

DIRS += [
'../../../modules/fdlibm',
]
7 changes: 7 additions & 0 deletions modules/fdlibm/moz.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DIRS += ['src']
63 changes: 63 additions & 0 deletions modules/fdlibm/src/moz.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

EXPORTS += [
'fdlibm.h',
]

FINAL_LIBRARY = 'fdlibm'

if CONFIG['GNU_CXX']:
CXXFLAGS += [
'-Wno-parentheses',
'-Wno-sign-compare',
]

if CONFIG['CLANG_CXX']:
CXXFLAGS += [
'-Wno-dangling-else',
]

if CONFIG['_MSC_VER']:
CXXFLAGS += [
'-wd4018', # signed/unsigned mismatch
'-wd4146', # unary minus operator applied to unsigned type
'-wd4305', # truncation from 'double' to 'const float'
'-wd4723', # potential divide by 0
'-wd4756', # overflow in constant arithmetic
]

SOURCES += [
'e_acos.cpp',
'e_acosh.cpp',
'e_asin.cpp',
'e_atan2.cpp',
'e_atanh.cpp',
'e_cosh.cpp',
'e_exp.cpp',
'e_hypot.cpp',
'e_log.cpp',
'e_log10.cpp',
'e_log2.cpp',
'e_pow.cpp',
'e_sinh.cpp',
'e_sqrt.cpp',
'k_exp.cpp',
's_asinh.cpp',
's_atan.cpp',
's_cbrt.cpp',
's_ceil.cpp',
's_ceilf.cpp',
's_copysign.cpp',
's_expm1.cpp',
's_fabs.cpp',
's_floor.cpp',
's_floorf.cpp',
's_log1p.cpp',
's_scalbn.cpp',
's_tanh.cpp',
's_trunc.cpp',
]
1 change: 1 addition & 0 deletions moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ if not CONFIG['JS_STANDALONE']:
]

DIRS += [
'config/external/fdlibm',
'config/external/zlib',
'memory',
'mfbt',
Expand Down

0 comments on commit 8eb6e36

Please sign in to comment.