Commit 5fa7dcc2 authored by Nika Layzell's avatar Nika Layzell
Browse files

Bug 1772006 - Part 8: Allow building xpcom/string without unified builds, r=xpcom-reviewers,barret

The last remaining things requiring unified builds in this directory are the
explicit specializations. As each class' methods are now confined to a single
file, these can now be moved to the appropriate .cpp files.

Differential Revision: https://phabricator.services.mozilla.com/D148303
parent 6255b111
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ UNIFIED_SOURCES += [
    "nsArrayEnumerator.cpp",
    "nsArrayUtils.cpp",
    "nsAtomTable.cpp",
    "nsCharSeparatedTokenizer.cpp",
    "nsCOMArray.cpp",
    "nsCRT.cpp",
    "nsDeque.cpp",
+10 −0
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 "nsCharSeparatedTokenizer.h"

template class nsTSubstringSplitter<char>;
template class nsTSubstringSplitter<char16_t>;
+1 −3
Original line number Diff line number Diff line
@@ -42,13 +42,13 @@ UNIFIED_SOURCES += [
    "nsTDependentString.cpp",
    "nsTDependentSubstring.cpp",
    "nsTextFormatter.cpp",
    "nsTLiteralString.cpp",
    "nsTPromiseFlatString.cpp",
    "nsTString.cpp",
    "nsTStringComparator.cpp",
    "nsTStringRepr.cpp",
    "nsTSubstring.cpp",
    "nsTSubstringTuple.cpp",
    "precompiled_templates.cpp",
    "RustStringAPI.cpp",
]

@@ -56,5 +56,3 @@ if CONFIG["MOZ_DEBUG"]:
    UNIFIED_SOURCES += ["nsStringStats.cpp"]

FINAL_LIBRARY = "xul"

REQUIRES_UNIFIED_BUILD = True
+3 −0
Original line number Diff line number Diff line
@@ -45,3 +45,6 @@ void nsTDependentString<T>::Rebind(const char_type* aStart,
  MOZ_RELEASE_ASSERT(aStart <= aEnd, "Overflow!");
  this->Rebind(aStart, aEnd - aStart);
}

template class nsTDependentString<char>;
template class nsTDependentString<char16_t>;
+5 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
 * 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/. */

// FIXME: Due to an include cycle, we need to include `nsTSubstring` first.
#include "nsTSubstring.h"
#include "nsTDependentSubstring.h"

template <typename T>
@@ -99,3 +101,6 @@ const nsTDependentSubstring<char16_t> Substring(char16ptr_t aStart,
                   static_cast<const char16_t*>(aEnd));
}
#endif

template class nsTDependentSubstring<char>;
template class nsTDependentSubstring<char16_t>;
Loading