xpcom/string/moz.build
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 30 Oct 2014 13:06:12 +0900
changeset 213063 55d15b285436576e1c5979f753e433c50fd9db3a
parent 206005 6fc33b189e9f7700d4db965fca73b2d5893c6a1c
child 218793 b14b9b335d4e1cf2a6e6ee0af1739b49506906ac
permissions -rw-r--r--
Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps There are, sadly, many combinations of linkage in use throughout the tree. The main differentiator, though, is between program/libraries related to Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent linkage, some standalone. Anyways, these new templates remove the need to manually define the right dependencies against xpcomglue, nspr, mozalloc and mozglue in most cases. Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now just not use those Gecko-specific templates.

# -*- 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 += [
    'nsAlgorithm.h',
    'nsAString.h',
    'nsCharTraits.h',
    'nsDependentString.h',
    'nsDependentSubstring.h',
    'nsEmbedString.h',
    'nsLiteralString.h',
    'nsPrintfCString.h',
    'nsPromiseFlatString.h',
    'nsReadableUtils.h',
    'nsString.h',
    'nsStringBuffer.h',
    'nsStringFwd.h',
    'nsStringIterator.h',
    'nsSubstring.h',
    'nsSubstringTuple.h',
    'nsTDependentString.h',
    'nsTDependentSubstring.h',
    'nsTLiteralString.h',
    'nsTPromiseFlatString.h',
    'nsTString.h',
    'nsTSubstring.h',
    'nsTSubstringTuple.h',
    'nsUTF8Utils.h',
    'nsXPCOMStrings.h',
    'nsXPIDLString.h',
    'string-template-def-char.h',
    'string-template-def-unichar.h',
    'string-template-undef.h',
]

UNIFIED_SOURCES += [
    'nsDependentString.cpp',
    'nsDependentSubstring.cpp',
    'nsPromiseFlatString.cpp',
    'nsReadableUtils.cpp',
    'nsString.cpp',
    'nsStringComparator.cpp',
    'nsStringObsolete.cpp',
    'nsSubstring.cpp',
    'nsSubstringTuple.cpp',
]

# Are we targeting x86 or x86-64?  If so, compile the SSE2 functions for
# nsUTF8Utils.cpp.
if CONFIG['INTEL_ARCHITECTURE']:
    SOURCES += ['nsUTF8UtilsSSE2.cpp']
    SOURCES['nsUTF8UtilsSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']

MSVC_ENABLE_PGO = True

FINAL_LIBRARY = 'xul'