Bug 933257 - Part 3: Add build scripts for fdlibm. r=jwalden
☠☠ backed out by ff0cb614dbdb ☠ ☠
authorTooru Fujisawa <arai_a@mac.com>
Wed, 18 Nov 2015 19:13:22 +0900
changeset 288402 e4a133efcb4d0eb9d8140c88c5c9e9967f6364bf
parent 288401 2f7c7d7ddacc51bcd6ad6a7d78fc99b80ef75724
child 288403 c2df769e60acdd47b600f7d58e3348f63c89ea5d
push id73418
push userarai_a@mac.com
push dateSat, 12 Mar 2016 17:22:03 +0000
treeherdermozilla-inbound@8db1ac84d30e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs933257
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 933257 - Part 3: Add build scripts for fdlibm. r=jwalden
config/external/fdlibm/moz.build
modules/fdlibm/moz.build
modules/fdlibm/src/moz.build
moz.build
new file mode 100644
--- /dev/null
+++ b/config/external/fdlibm/moz.build
@@ -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',
+]
new file mode 100644
--- /dev/null
+++ b/modules/fdlibm/moz.build
@@ -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']
new file mode 100644
--- /dev/null
+++ b/modules/fdlibm/src/moz.build
@@ -0,0 +1,71 @@
+# -*- 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_rem_pio2.cpp',
+    'e_sinh.cpp',
+    'e_sqrt.cpp',
+    'k_cos.cpp',
+    'k_exp.cpp',
+    'k_rem_pio2.cpp',
+    'k_sin.cpp',
+    'k_tan.cpp',
+    's_asinh.cpp',
+    's_atan.cpp',
+    's_cbrt.cpp',
+    's_ceil.cpp',
+    's_ceilf.cpp',
+    's_copysign.cpp',
+    's_cos.cpp',
+    's_expm1.cpp',
+    's_fabs.cpp',
+    's_floor.cpp',
+    's_floorf.cpp',
+    's_log1p.cpp',
+    's_scalbn.cpp',
+    's_sin.cpp',
+    's_tan.cpp',
+    's_tanh.cpp',
+    's_trunc.cpp',
+]
--- a/moz.build
+++ b/moz.build
@@ -46,16 +46,17 @@ if not CONFIG['JS_STANDALONE']:
     GENERATED_FILES['source-repo.h'].script = 'build/variables.py:source_repo_header'
 
     DIRS += [
         'build',
         'probes',
     ]
 
 DIRS += [
+    'config/external/fdlibm',
     'config/external/zlib',
     'memory',
     'mfbt',
     'mozglue',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and int(CONFIG['MOZ_ANDROID_MIN_SDK_VERSION']) < 11:
     DIRS += ['other-licenses/android']