Bug 1423094 - Remove the msvcrt argument to GeckoProgram. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 05 Dec 2017 15:36:52 +0900
changeset 707348 8d3a3f586b9e8809ab328eadd3d04af61461f71d
parent 707347 f367f786090fcd92ed147f3ebaca1626d917ea46
child 707349 bbec3abaff6c202f6af2cb8ef18a1e0fcbc4be54
push id92096
push userbmo:mh+mozilla@glandium.org
push dateTue, 05 Dec 2017 06:40:33 +0000
reviewersbuild
bugs1423094
milestone59.0a1
Bug 1423094 - Remove the msvcrt argument to GeckoProgram. r?build The last use in gecko was removed in the previous change, and the only use in comm-central should be trivial to remove. It's not worth the extra complexity to keep this argument.
build/gecko_templates.mozbuild
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -1,59 +1,42 @@
 # -*- 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/.
 
 @template
-def GeckoBinary(linkage='dependent', msvcrt='dynamic', mozglue=None):
+def GeckoBinary(linkage='dependent', mozglue=None):
     '''Template for Gecko-related binaries.
 
     This template is meant to be used in other templates.
 
     `linkage` indicates the wanted xpcom linkage type. Valid values are
     'dependent', 'standalone' or None. 'dependent' is the default. It is
     used for e.g. XPCOM components and executables with direct dependencies
     on libxul. Most executables should use the 'standalone' linkage, which
     uses the standalone XPCOM glue to load libxul. None means no XPCOM glue
     or libxul linkage at all.
 
-    `msvcrt` indicates which Microsoft Visual Studio CRT, for Windows build,
-    ought to be linked: 'static' or 'dynamic'.
-
     `mozglue` indicates whether to link against the mozglue library, and if
     so, what linkage to apply. Valid values are None (mozglue not linked),
     'program' (mozglue linked to an executable program), or 'library' (mozglue
     linked to a shared library).
     '''
-    if msvcrt == 'dynamic' or CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['MOZ_ASAN']:
-        xpcomglue = 'xpcomglue'
-    elif msvcrt == 'static':
-        USE_STATIC_LIBS = True
-        xpcomglue = 'xpcomglue_staticruntime'
-        if not CONFIG['GNU_CC']:
-            mozglue = None
-            if linkage == 'dependent':
-                USE_LIBS += [
-                    'mozalloc_staticruntime',
-                ]
-    else:
-        error('msvcrt must be "dynamic" or "static"')
-
     if linkage == 'dependent':
         USE_LIBS += [
             'nspr',
             'xul',
         ]
     elif linkage == 'standalone':
         DEFINES['XPCOM_GLUE'] = True
 
         USE_LIBS += [
-            xpcomglue,
+            'xpcomglue',
         ]
     elif linkage != None:
         error('`linkage` must be "dependent", "standalone" or None')
 
     if mozglue:
         LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
         if mozglue == 'program':
             USE_LIBS += ['mozglue']