summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-11-04 14:59:00 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-11-04 14:59:00 -0500
commitcdf46e803b2fc1ab0787138890dfff67030e6516 (patch)
tree057a09cc023f75da63c7b45c77613ae812aea67d /js
parent59511eb8dddac5556c4aa72d6d7fe1a2c3dc3972 (diff)
downloadUXP-cdf46e803b2fc1ab0787138890dfff67030e6516.tar
UXP-cdf46e803b2fc1ab0787138890dfff67030e6516.tar.gz
UXP-cdf46e803b2fc1ab0787138890dfff67030e6516.tar.lz
UXP-cdf46e803b2fc1ab0787138890dfff67030e6516.tar.xz
UXP-cdf46e803b2fc1ab0787138890dfff67030e6516.zip
Issue #1676 - Part 19: Split ctypes sources out of js/src/moz.build
Diffstat (limited to 'js')
-rw-r--r--js/src/ctypes/moz.build26
-rw-r--r--js/src/moz.build19
2 files changed, 29 insertions, 16 deletions
diff --git a/js/src/ctypes/moz.build b/js/src/ctypes/moz.build
new file mode 100644
index 000000000..5bea399f3
--- /dev/null
+++ b/js/src/ctypes/moz.build
@@ -0,0 +1,26 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# 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/.
+
+include('../js-config.mozbuild')
+include('../js-cxxflags.mozbuild')
+
+FINAL_LIBRARY = "js"
+
+# Includes should be relative to parent path
+LOCAL_INCLUDES += ["!..", ".."]
+
+SOURCES += [
+ 'CTypes.cpp',
+ 'Library.cpp',
+]
+
+if not CONFIG['MOZ_SYSTEM_FFI']:
+ LOCAL_INCLUDES += [
+ '!libffi/include',
+ 'libffi/src/%s' % CONFIG['FFI_TARGET_DIR'],
+ ]
+
+if CONFIG['_MSC_VER'] and CONFIG['CPU_ARCH'] == 'x86_64':
+ SOURCES['CTypes.cpp'].no_pgo = True # Bug 810661 \ No newline at end of file
diff --git a/js/src/moz.build b/js/src/moz.build
index 7b963ac42..20c1e5722 100644
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -122,6 +122,9 @@ if CONFIG['JS_BUNDLED_EDITLINE']:
if not CONFIG['JS_DISABLE_SHELL']:
DIRS += ['shell']
+if CONFIG['JS_HAS_CTYPES']:
+ DIRS += ['ctypes']
+
SOURCES += [
'jsalloc.cpp',
'jsapi.cpp',
@@ -230,17 +233,6 @@ if CONFIG['ENABLE_TRACE_LOGGING']:
'vm/TraceLoggingTypes.cpp',
]
-if CONFIG['JS_HAS_CTYPES']:
- SOURCES += [
- 'ctypes/CTypes.cpp',
- 'ctypes/Library.cpp',
- ]
- if not CONFIG['MOZ_SYSTEM_FFI']:
- LOCAL_INCLUDES += [
- '!ctypes/libffi/include',
- 'ctypes/libffi/src/%s' % CONFIG['FFI_TARGET_DIR'],
- ]
-
if CONFIG['MOZ_VTUNE']:
SOURCES += [
'vtune/jitprofiling.c'
@@ -281,11 +273,6 @@ USE_LIBS += [
'zlib',
]
-
-if CONFIG['_MSC_VER']:
- if CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']:
- SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661
-
if CONFIG['OS_ARCH'] not in ('WINNT'):
OS_LIBS += ['m']