diff options
author | Matt A. Tobin <email@mattatobin.com> | 2021-11-20 21:15:14 -0500 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-07 15:42:57 +0200 |
commit | b2ad7e8ed963768f53053bd0495e69f80c3a4c33 (patch) | |
tree | cfdd7fc05fed4e6c45094d687980d9ccbfd5519f /build | |
parent | 3b48d984b2a0524ed9ca26b48f09831d9d88fc2e (diff) | |
download | uxp-b2ad7e8ed963768f53053bd0495e69f80c3a4c33.tar.gz |
Issue #1847 - Updates to handle NSS
Bug 1295937
Diffstat (limited to 'build')
-rw-r--r-- | build/gyp.mozbuild | 37 | ||||
-rw-r--r-- | build/gyp_base.mozbuild | 38 | ||||
-rw-r--r-- | build/moz.configure/init.configure | 1 |
3 files changed, 44 insertions, 32 deletions
diff --git a/build/gyp.mozbuild b/build/gyp.mozbuild index ff04f6aac1..a0ddd6939c 100644 --- a/build/gyp.mozbuild +++ b/build/gyp.mozbuild @@ -4,7 +4,9 @@ # 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/. -gyp_vars = { +include('gyp_base.mozbuild') + +gyp_vars.update({ 'lsan': 0, 'asan': 0, 'build_with_mozilla': 1, @@ -69,16 +71,9 @@ gyp_vars = { # linker to throw away uneeded bits. 'include_isac': 1, 'include_pcm16b': 1, -} - -os = CONFIG['OS_TARGET'] +}) -if os == 'WINNT': - gyp_vars.update( - MSVS_VERSION=CONFIG['_MSVS_VERSION'], - MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_BUILD'] else 32, - ) -elif os == 'Android': +if os == 'Android': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': gyp_vars['build_with_gonk'] = 1 gyp_vars['moz_widget_toolkit_gonk'] = 1 @@ -92,28 +87,6 @@ elif os == 'Android': android_toolchain=CONFIG.get('ANDROID_TOOLCHAIN', ''), ) -flavors = { - 'WINNT': 'win', - 'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android', - 'Linux': 'linux', - 'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios', - 'SunOS': 'solaris', - 'GNU/kFreeBSD': 'freebsd', - 'DragonFly': 'dragonfly', - 'FreeBSD': 'freebsd', - 'NetBSD': 'netbsd', - 'OpenBSD': 'openbsd', -} -gyp_vars['OS'] = flavors.get(os) - -arches = { - 'x86_64': 'x64', - 'x86': 'ia32', - 'aarch64': 'arm64', -} - -gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH']) - if CONFIG['ARM_ARCH']: if int(CONFIG['ARM_ARCH']) < 7: gyp_vars['armv7'] = 0 diff --git a/build/gyp_base.mozbuild b/build/gyp_base.mozbuild new file mode 100644 index 0000000000..bbdaa0c583 --- /dev/null +++ b/build/gyp_base.mozbuild @@ -0,0 +1,38 @@ +# -*- Mode: python; 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/. + +gyp_vars = {} + +os = CONFIG['OS_TARGET'] + +if os == 'WINNT': + gyp_vars.update( + MSVS_VERSION=CONFIG['_MSVS_VERSION'], + MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_BUILD'] else 32, + ) + +flavors = { + 'WINNT': 'win', + 'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android', + 'Linux': 'linux', + 'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios', + 'SunOS': 'solaris', + 'GNU/kFreeBSD': 'freebsd', + 'DragonFly': 'dragonfly', + 'FreeBSD': 'freebsd', + 'NetBSD': 'netbsd', + 'OpenBSD': 'openbsd', +} +gyp_vars['OS'] = flavors.get(os) + +arches = { + 'x86_64': 'x64', + 'x86': 'ia32', + 'aarch64': 'arm64', +} + +gyp_vars['host_arch'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH']) +gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH']) diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure index 8f275aee01..6c4f74c0d8 100644 --- a/build/moz.configure/init.configure +++ b/build/moz.configure/init.configure @@ -518,6 +518,7 @@ def host_variables(host): HOST_OS_ARCH=os_arch, ) +set_config('HOST_CPU_ARCH', delayed_getattr(host, 'cpu')) set_config('HOST_OS_ARCH', delayed_getattr(host_variables, 'HOST_OS_ARCH')) add_old_configure_assignment('HOST_OS_ARCH', delayed_getattr(host_variables, 'HOST_OS_ARCH')) |