# 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/. { 'variables': { 'module%': '', 'variables': { 'variables': { 'variables': { 'python%': 'python', }, # chromium uses pymod_do_main, but gyp doesn't set a sensible # Python sys.path (gyp_chromium does). 'python%': '<(python)', 'host_arch%': '(mapfile)', ], }, 'conditions': [ [ 'cc_use_gnu_ld==1', { 'ldflags': [ '-Wl,--version-script,<(INTERMEDIATE_DIR)/out.>(mapfile)', ], }], [ 'cc_use_gnu_ld!=1 and OS=="win"', { # On Windows, .def files are used directly as sources. 'sources': [ '>(mapfile)', ], }, { # On other platforms, .def files need processing. 'sources': [ '<(INTERMEDIATE_DIR)/out.>(mapfile)', ], 'actions': [{ 'action_name': 'generate_mapfile', 'inputs': [ '>(mapfile)', ], 'outputs': [ '<(INTERMEDIATE_DIR)/out.>(mapfile)', ], 'action': ['<@(process_map_file)'], }], }] ], }, 'static_libs==1 and _type=="shared_library"', { # When linking a shared lib against a static one, XCode doesn't # export the latter's symbols by default. -all_load fixes that. 'xcode_settings': { 'OTHER_LDFLAGS': [ '-all_load', ], }, }], [ '_type=="shared_library" or _type=="executable"', { 'libraries': [ '<@(nspr_libs)', ], 'library_dirs': [ '<(nspr_lib_dir)', ], }], # Shared library specific settings. [ '_type=="shared_library"', { 'conditions': [ [ 'cc_use_gnu_ld==1', { 'ldflags': [ '-Wl,--gc-sections', ], 'conditions': [ ['no_zdefs==0', { 'ldflags': [ '-Wl,-z,defs', ], }], ], }], ], 'xcode_settings': { 'DYLIB_INSTALL_NAME_BASE': '@executable_path', 'DYLIB_COMPATIBILITY_VERSION': '1', 'DYLIB_CURRENT_VERSION': '1', 'OTHER_LDFLAGS': [ '-headerpad_max_install_names', ], }, 'msvs_settings': { 'VCLinkerTool': { 'SubSystem': '2', }, }, }], ], 'default_configuration': 'Debug', 'configurations': { # Common settings for Debug+Release should go here. 'Common': { 'abstract': 1, 'defines': [ 'USE_UTIL_DIRECTLY', 'NO_NSPR_10_SUPPORT', 'SSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES', ], 'msvs_configuration_attributes': { 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', }, 'msvs_settings': { 'VCCLCompilerTool': { 'AdditionalIncludeDirectories': ['<(nspr_include_dir)'], }, }, 'xcode_settings': { 'CLANG_CXX_LANGUAGE_STANDARD': 'c++0x', 'OTHER_CFLAGS': [ '-fPIC', '-fno-common', '-pipe', ], }, 'conditions': [ [ 'OS=="linux" or OS=="android"', { 'defines': [ 'LINUX2_1', 'LINUX', 'linux', ], }], [ 'OS=="dragonfly" or OS=="freebsd"', { 'defines': [ 'FREEBSD', ], }], [ 'OS=="netbsd"', { 'defines': [ 'NETBSD', ], }], [ 'OS=="openbsd"', { 'defines': [ 'OPENBSD', ], }], ['OS=="mac" or OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or OS=="openbsd"', { 'defines': [ 'HAVE_BSD_FLOCK', ], }], [ 'OS!="win"', { 'defines': [ 'HAVE_STRERROR', 'XP_UNIX', '_REENTRANT', ], }], [ 'OS!="mac" and OS!="win"', { 'cflags': [ '-fPIC', '-pipe', '-ffunction-sections', '-fdata-sections', ], 'cflags_cc': [ '-std=c++0x', ], 'ldflags': [ '-z', 'noexecstack', ], 'conditions': [ [ 'target_arch=="ia32"', { 'cflags': ['-m32'], 'ldflags': ['-m32'], }], [ 'target_arch=="x64"', { 'cflags': ['-m64'], 'ldflags': ['-m64'], }], ], }], [ 'use_pprof==1 and OS!="android" and OS!="win"', { 'conditions': [ [ 'OS=="mac"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lprofiler' ], }, }, { 'ldflags': [ '-lprofiler' ], }], [ 'OS!="linux"', { 'library_dirs': [ '/usr/local/lib/', ], }], ], }], [ 'disable_werror==0 and OS!="android" and OS!="win"', { 'cflags': [ '(mapfile) | sed -e "s,;+,," -e "s; DATA ;;" -e "s,;;,," -e "s,;.*,;," > >@(_outputs)'], }, }], [ 'OS=="mac"', { 'variables': { 'process_map_file': ['/bin/sh', '-c', '/usr/bin/grep -v ";+" >(mapfile) | grep -v ";-" | sed -e "s; DATA ;;" -e "s,;;,," -e "s,;.*,," -e "s,^,_," > >@(_outputs)'], }, }], ], }