Bug 1401453 - Don't keep libmemory.a separate anymore. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 20 Sep 2017 14:23:57 +0900
changeset 667489 0b82098632cb41919a8f82fa17458ff23362050f
parent 667488 72b1e768c334d814da7156bb17eee55da766549d
child 732399 bcb43a506739843b971b46498aa76a35564abecc
push id80726
push userbmo:mh+mozilla@glandium.org
push dateWed, 20 Sep 2017 05:27:24 +0000
reviewersgps
bugs1401453, 736564
milestone57.0a1
Bug 1401453 - Don't keep libmemory.a separate anymore. r?gps This was done in bug 736564 for the xulrunner SDK, which later became the firefox SDK, which is now gone. So we don't actually need to keep it separate anymore (except for logalloc/replay, which still needs to link it directly, so we keep the library definition intact so it can be referenced ; we just don't DIST_INSTALL it anymore, and always make it linked into mozglue)
build/gecko_templates.mozbuild
memory/build/moz.build
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -53,21 +53,18 @@ def GeckoBinary(linkage='dependent', msv
     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']
             DEFINES['MOZ_HAS_MOZGLUE'] = True
-            if CONFIG['MOZ_GLUE_IN_PROGRAM']:
-                if CONFIG['GNU_CC']:
-                    LDFLAGS += ['-rdynamic']
-                if CONFIG['MOZ_MEMORY']:
-                    USE_LIBS += ['memory']
+            if CONFIG['MOZ_GLUE_IN_PROGRAM'] and CONFIG['GNU_CC']:
+                LDFLAGS += ['-rdynamic']
         elif mozglue == 'library':
             LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
             if not CONFIG['MOZ_GLUE_IN_PROGRAM']:
                 USE_LIBS += ['mozglue']
         else:
             error('`mozglue` must be "program" or "library"')
 
     if not CONFIG['JS_STANDALONE']:
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -28,27 +28,22 @@ UNIFIED_SOURCES += [
 if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or
         CONFIG['MOZ_MEMORY']):
     SOURCES += [
         'zone.c',
     ]
 
 Library('memory')
 
-if CONFIG['MOZ_GLUE_IN_PROGRAM']:
-    DIST_INSTALL = True
-
 if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
     CFLAGS += [
         '-Wno-tautological-pointer-compare',
     ]
 
-# Keep jemalloc separated when mozglue is statically linked
-if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
-    FINAL_LIBRARY = 'mozglue'
+FINAL_LIBRARY = 'mozglue'
 
 if CONFIG['GNU_CXX']:
     # too many warnings from functions generated through rb_wrab from rb.h.
     CXXFLAGS += ['-Wno-unused-function',
                  '-Wno-error=uninitialized']
 
 if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)