Bug 1035125 Part 4: Back out changeset 8ae39d920f5c and associated subsequent changes. r=glandium
authorBob Owen <bobowencode@gmail.com>
Sun, 15 May 2016 16:23:57 +0100
changeset 297622 8de111c0df7c064c392ce68110d6111c8087b90f
parent 297621 74634eed179d64791e1e61b01f7b07f16c498d7c
child 297623 3b9b7b90c5f4dc1ec36d578bea8b3d29616a21c7
push id76830
push userbobowencode@gmail.com
push dateTue, 17 May 2016 07:42:57 +0000
treeherdermozilla-inbound@a416c55e6648 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1035125, 1023941
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1035125 Part 4: Back out changeset 8ae39d920f5c and associated subsequent changes. r=glandium The original changeset that is being backed out had comment: Bug 1023941 - Part 2: Static-link the CRT into plugin-container.exe. MozReview-Commit-ID: 1iPJghgd0t2
dom/media/gmp/rlz/moz.build
ipc/app/moz.build
security/sandbox/moz.build
security/sandbox/objs.mozbuild
security/sandbox/staticruntime/moz.build
--- a/dom/media/gmp/rlz/moz.build
+++ b/dom/media/gmp/rlz/moz.build
@@ -4,17 +4,16 @@
 # 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/.
 
 # Note: build rlz in its own moz.build, so it doesn't pickup any of
 # Chromium IPC's headers used in the moz.build of the parent file.
 
 Library('rlz')
 FORCE_STATIC_LIB = True
-USE_STATIC_LIBS = True
 
 UNIFIED_SOURCES += [
     'lib/string_utils.cc',
 ]
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     UNIFIED_SOURCES += [
         'win/lib/machine_id_win.cc',
--- a/ipc/app/moz.build
+++ b/ipc/app/moz.build
@@ -9,34 +9,21 @@
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     Program(CONFIG['MOZ_CHILD_PROCESS_NAME'])
     SOURCES += [
         'MozillaRuntimeMainAndroid.cpp',
     ]
 
     DIRS += ['pie']
 else:
-    kwargs = {
-        'linkage': None,
-    }
-    if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['MOZ_ASAN']:
-        kwargs['msvcrt'] = 'static'
-        if not CONFIG['GNU_CC']:
-            USE_LIBS += [
-                'mozalloc_staticruntime',
-            ]
-    GeckoProgram(CONFIG['MOZ_CHILD_PROCESS_NAME'], **kwargs)
+    GeckoProgram(CONFIG['MOZ_CHILD_PROCESS_NAME'], linkage='dependent')
 
     SOURCES += [
         'MozillaRuntimeMain.cpp',
     ]
-    USE_LIBS += [
-        'nspr',
-        'xul',
-    ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
     '/xpcom/base',
 ]
 
@@ -52,28 +39,18 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_
     LOCAL_INCLUDES += [
         '/security/sandbox/chromium',
         '/security/sandbox/chromium-shim',
     ]
     USE_LIBS += [
         'rlz',
     ]
 
-    if CONFIG['MOZ_ASAN']:
-        USE_LIBS += [
-            'sandbox_s',
-        ]
-    else:
-        USE_LIBS += [
-            'sandbox_staticruntime_s',
-        ]
-
-    DELAYLOAD_DLLS += [
-        'nss3.dll',
-        'xul.dll'
+    USE_LIBS += [
+        'sandbox_s',
     ]
 
     DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
     SOURCES += [
         'sha256.c',
     ]
 
 if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ('Linux', 'Android'):
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -11,37 +11,152 @@ if CONFIG['OS_ARCH'] == 'Linux':
     DIRS += ['linux']
 elif CONFIG['OS_ARCH'] == 'Darwin':
     DIRS += ['mac']
 elif CONFIG['OS_ARCH'] == 'WINNT':
     Library('sandbox_s')
     FORCE_STATIC_LIB = True
 
     DIRS += [
-        'staticruntime',
         'win/src/sandboxbroker',
         'win/src/sandboxtarget',
     ]
 
     if (CONFIG['CPU_ARCH'] == 'x86' and CONFIG['_MSC_VER'] and not
             CONFIG['CLANG_CL']):
         DIRS += ['win/wow_helper']
 
     EXPORTS.mozilla.sandboxing += [
         'chromium-shim/sandbox/win/loggingCallbacks.h',
         'chromium-shim/sandbox/win/loggingTypes.h',
         'chromium-shim/sandbox/win/sandboxLogging.h',
     ]
 
-    include('objs.mozbuild')
-    SOURCES += security_sandbox_cppsrcs
+    SOURCES += [
+        'chromium-shim/base/logging.cpp',
+        'chromium-shim/sandbox/win/sandboxLogging.cpp',
+        'chromium/base/at_exit.cc',
+        'chromium/base/base_switches.cc',
+        'chromium/base/callback_internal.cc',
+        'chromium/base/cpu.cc',
+        'chromium/base/debug/alias.cc',
+        'chromium/base/debug/profiler.cc',
+        'chromium/base/hash.cc',
+        'chromium/base/lazy_instance.cc',
+        'chromium/base/location.cc',
+        'chromium/base/memory/ref_counted.cc',
+        'chromium/base/memory/singleton.cc',
+        'chromium/base/strings/nullable_string16.cc',
+        'chromium/base/strings/string_number_conversions.cc',
+        'chromium/base/strings/string_piece.cc',
+        'chromium/base/strings/string_split.cc',
+        'chromium/base/strings/string_util.cc',
+        'chromium/base/strings/string_util_constants.cc',
+        'chromium/base/strings/stringprintf.cc',
+        'chromium/base/strings/utf_string_conversion_utils.cc',
+        'chromium/base/strings/utf_string_conversions.cc',
+        'chromium/base/synchronization/lock.cc',
+        'chromium/base/synchronization/lock_impl_win.cc',
+        'chromium/base/third_party/dmg_fp/dtoa.cc',
+        'chromium/base/third_party/dmg_fp/g_fmt.cc',
+        'chromium/base/third_party/icu/icu_utf.cc',
+        'chromium/base/third_party/superfasthash/superfasthash.c',
+        'chromium/base/threading/platform_thread_win.cc',
+        'chromium/base/threading/thread_collision_warner.cc',
+        'chromium/base/threading/thread_id_name_manager.cc',
+        'chromium/base/threading/thread_local_win.cc',
+        'chromium/base/threading/thread_restrictions.cc',
+        'chromium/base/time/time.cc',
+        'chromium/base/time/time_win.cc',
+        'chromium/base/win/pe_image.cc',
+        'chromium/base/win/scoped_handle.cc',
+        'chromium/base/win/scoped_process_information.cc',
+        'chromium/base/win/startup_information.cc',
+        'chromium/base/win/windows_version.cc',
+        'chromium/sandbox/win/src/acl.cc',
+        'chromium/sandbox/win/src/app_container.cc',
+        'chromium/sandbox/win/src/broker_services.cc',
+        'chromium/sandbox/win/src/crosscall_server.cc',
+        'chromium/sandbox/win/src/eat_resolver.cc',
+        'chromium/sandbox/win/src/filesystem_dispatcher.cc',
+        'chromium/sandbox/win/src/filesystem_interception.cc',
+        'chromium/sandbox/win/src/filesystem_policy.cc',
+        'chromium/sandbox/win/src/handle_closer.cc',
+        'chromium/sandbox/win/src/handle_closer_agent.cc',
+        'chromium/sandbox/win/src/handle_dispatcher.cc',
+        'chromium/sandbox/win/src/handle_interception.cc',
+        'chromium/sandbox/win/src/handle_policy.cc',
+        'chromium/sandbox/win/src/handle_table.cc',
+        'chromium/sandbox/win/src/interception.cc',
+        'chromium/sandbox/win/src/interception_agent.cc',
+        'chromium/sandbox/win/src/job.cc',
+        'chromium/sandbox/win/src/named_pipe_dispatcher.cc',
+        'chromium/sandbox/win/src/named_pipe_interception.cc',
+        'chromium/sandbox/win/src/named_pipe_policy.cc',
+        'chromium/sandbox/win/src/policy_broker.cc',
+        'chromium/sandbox/win/src/policy_engine_opcodes.cc',
+        'chromium/sandbox/win/src/policy_engine_processor.cc',
+        'chromium/sandbox/win/src/policy_low_level.cc',
+        'chromium/sandbox/win/src/policy_target.cc',
+        'chromium/sandbox/win/src/process_mitigations.cc',
+        'chromium/sandbox/win/src/process_mitigations_win32k_dispatcher.cc',
+        'chromium/sandbox/win/src/process_mitigations_win32k_interception.cc',
+        'chromium/sandbox/win/src/process_mitigations_win32k_policy.cc',
+        'chromium/sandbox/win/src/process_thread_dispatcher.cc',
+        'chromium/sandbox/win/src/process_thread_interception.cc',
+        'chromium/sandbox/win/src/process_thread_policy.cc',
+        'chromium/sandbox/win/src/registry_dispatcher.cc',
+        'chromium/sandbox/win/src/registry_interception.cc',
+        'chromium/sandbox/win/src/registry_policy.cc',
+        'chromium/sandbox/win/src/resolver.cc',
+        'chromium/sandbox/win/src/restricted_token.cc',
+        'chromium/sandbox/win/src/restricted_token_utils.cc',
+        'chromium/sandbox/win/src/sandbox.cc',
+        'chromium/sandbox/win/src/sandbox_globals.cc',
+        'chromium/sandbox/win/src/sandbox_nt_util.cc',
+        'chromium/sandbox/win/src/sandbox_policy_base.cc',
+        'chromium/sandbox/win/src/sandbox_utils.cc',
+        'chromium/sandbox/win/src/service_resolver.cc',
+        'chromium/sandbox/win/src/shared_handles.cc',
+        'chromium/sandbox/win/src/sharedmem_ipc_client.cc',
+        'chromium/sandbox/win/src/sharedmem_ipc_server.cc',
+        'chromium/sandbox/win/src/sid.cc',
+        'chromium/sandbox/win/src/sync_dispatcher.cc',
+        'chromium/sandbox/win/src/sync_interception.cc',
+        'chromium/sandbox/win/src/sync_policy.cc',
+        'chromium/sandbox/win/src/target_interceptions.cc',
+        'chromium/sandbox/win/src/target_process.cc',
+        'chromium/sandbox/win/src/target_services.cc',
+        'chromium/sandbox/win/src/win2k_threadpool.cc',
+        'chromium/sandbox/win/src/win_utils.cc',
+        'chromium/sandbox/win/src/window.cc',
+    ]
+
+    if CONFIG['CPU_ARCH'] == 'x86_64':
+        SOURCES += [
+            'chromium/sandbox/win/src/interceptors_64.cc',
+            'chromium/sandbox/win/src/resolver_64.cc',
+            'chromium/sandbox/win/src/service_resolver_64.cc',
+            'chromium/sandbox/win/src/Wow64_64.cc',
+        ]
+    else:
+        SOURCES += [
+            'chromium/sandbox/win/src/resolver_32.cc',
+            'chromium/sandbox/win/src/service_resolver_32.cc',
+            'chromium/sandbox/win/src/sidestep/ia32_modrm_map.cpp',
+            'chromium/sandbox/win/src/sidestep/ia32_opcode_map.cpp',
+            'chromium/sandbox/win/src/sidestep/mini_disassembler.cpp',
+            'chromium/sandbox/win/src/sidestep/preamble_patcher_with_stub.cpp',
+            'chromium/sandbox/win/src/sidestep_resolver.cc',
+            'chromium/sandbox/win/src/Wow64.cc',
+        ]
 
     # Bug 1102853 tracks looking at removing this.
     if CONFIG['CPU_ARCH'] == 'x86_64':
-        SOURCES['/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_client.cc'].no_pgo = True
+        SOURCES['chromium/sandbox/win/src/sharedmem_ipc_client.cc'].no_pgo = True
 
     for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
                 '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
         DEFINES[var] = True
 
     LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/nsprpub']
deleted file mode 100644
--- a/security/sandbox/objs.mozbuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# -*- 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/.
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    security_sandbox_lcppsrcs = [
-        'chromium-shim/base/logging.cpp',
-        'chromium-shim/sandbox/win/sandboxLogging.cpp',
-        'chromium/base/at_exit.cc',
-        'chromium/base/base_switches.cc',
-        'chromium/base/callback_internal.cc',
-        'chromium/base/cpu.cc',
-        'chromium/base/debug/alias.cc',
-        'chromium/base/debug/profiler.cc',
-        'chromium/base/hash.cc',
-        'chromium/base/lazy_instance.cc',
-        'chromium/base/location.cc',
-        'chromium/base/memory/ref_counted.cc',
-        'chromium/base/memory/singleton.cc',
-        'chromium/base/strings/nullable_string16.cc',
-        'chromium/base/strings/string_number_conversions.cc',
-        'chromium/base/strings/string_piece.cc',
-        'chromium/base/strings/string_split.cc',
-        'chromium/base/strings/string_util.cc',
-        'chromium/base/strings/string_util_constants.cc',
-        'chromium/base/strings/stringprintf.cc',
-        'chromium/base/strings/utf_string_conversion_utils.cc',
-        'chromium/base/strings/utf_string_conversions.cc',
-        'chromium/base/synchronization/lock.cc',
-        'chromium/base/synchronization/lock_impl_win.cc',
-        'chromium/base/third_party/dmg_fp/dtoa.cc',
-        'chromium/base/third_party/dmg_fp/g_fmt.cc',
-        'chromium/base/third_party/icu/icu_utf.cc',
-        'chromium/base/third_party/superfasthash/superfasthash.c',
-        'chromium/base/threading/platform_thread_win.cc',
-        'chromium/base/threading/thread_collision_warner.cc',
-        'chromium/base/threading/thread_id_name_manager.cc',
-        'chromium/base/threading/thread_local_win.cc',
-        'chromium/base/threading/thread_restrictions.cc',
-        'chromium/base/time/time.cc',
-        'chromium/base/time/time_win.cc',
-        'chromium/base/win/pe_image.cc',
-        'chromium/base/win/scoped_handle.cc',
-        'chromium/base/win/scoped_process_information.cc',
-        'chromium/base/win/startup_information.cc',
-        'chromium/base/win/windows_version.cc',
-        'chromium/sandbox/win/src/acl.cc',
-        'chromium/sandbox/win/src/app_container.cc',
-        'chromium/sandbox/win/src/broker_services.cc',
-        'chromium/sandbox/win/src/crosscall_server.cc',
-        'chromium/sandbox/win/src/eat_resolver.cc',
-        'chromium/sandbox/win/src/filesystem_dispatcher.cc',
-        'chromium/sandbox/win/src/filesystem_interception.cc',
-        'chromium/sandbox/win/src/filesystem_policy.cc',
-        'chromium/sandbox/win/src/handle_closer.cc',
-        'chromium/sandbox/win/src/handle_closer_agent.cc',
-        'chromium/sandbox/win/src/handle_dispatcher.cc',
-        'chromium/sandbox/win/src/handle_interception.cc',
-        'chromium/sandbox/win/src/handle_policy.cc',
-        'chromium/sandbox/win/src/handle_table.cc',
-        'chromium/sandbox/win/src/interception.cc',
-        'chromium/sandbox/win/src/interception_agent.cc',
-        'chromium/sandbox/win/src/job.cc',
-        'chromium/sandbox/win/src/named_pipe_dispatcher.cc',
-        'chromium/sandbox/win/src/named_pipe_interception.cc',
-        'chromium/sandbox/win/src/named_pipe_policy.cc',
-        'chromium/sandbox/win/src/policy_broker.cc',
-        'chromium/sandbox/win/src/policy_engine_opcodes.cc',
-        'chromium/sandbox/win/src/policy_engine_processor.cc',
-        'chromium/sandbox/win/src/policy_low_level.cc',
-        'chromium/sandbox/win/src/policy_target.cc',
-        'chromium/sandbox/win/src/process_mitigations.cc',
-        'chromium/sandbox/win/src/process_mitigations_win32k_dispatcher.cc',
-        'chromium/sandbox/win/src/process_mitigations_win32k_interception.cc',
-        'chromium/sandbox/win/src/process_mitigations_win32k_policy.cc',
-        'chromium/sandbox/win/src/process_thread_dispatcher.cc',
-        'chromium/sandbox/win/src/process_thread_interception.cc',
-        'chromium/sandbox/win/src/process_thread_policy.cc',
-        'chromium/sandbox/win/src/registry_dispatcher.cc',
-        'chromium/sandbox/win/src/registry_interception.cc',
-        'chromium/sandbox/win/src/registry_policy.cc',
-        'chromium/sandbox/win/src/resolver.cc',
-        'chromium/sandbox/win/src/restricted_token.cc',
-        'chromium/sandbox/win/src/restricted_token_utils.cc',
-        'chromium/sandbox/win/src/sandbox.cc',
-        'chromium/sandbox/win/src/sandbox_globals.cc',
-        'chromium/sandbox/win/src/sandbox_nt_util.cc',
-        'chromium/sandbox/win/src/sandbox_policy_base.cc',
-        'chromium/sandbox/win/src/sandbox_utils.cc',
-        'chromium/sandbox/win/src/service_resolver.cc',
-        'chromium/sandbox/win/src/shared_handles.cc',
-        'chromium/sandbox/win/src/sharedmem_ipc_client.cc',
-        'chromium/sandbox/win/src/sharedmem_ipc_server.cc',
-        'chromium/sandbox/win/src/sid.cc',
-        'chromium/sandbox/win/src/sync_dispatcher.cc',
-        'chromium/sandbox/win/src/sync_interception.cc',
-        'chromium/sandbox/win/src/sync_policy.cc',
-        'chromium/sandbox/win/src/target_interceptions.cc',
-        'chromium/sandbox/win/src/target_process.cc',
-        'chromium/sandbox/win/src/target_services.cc',
-        'chromium/sandbox/win/src/win2k_threadpool.cc',
-        'chromium/sandbox/win/src/win_utils.cc',
-        'chromium/sandbox/win/src/window.cc',
-    ]
-
-    if CONFIG['CPU_ARCH'] == 'x86_64':
-        security_sandbox_lcppsrcs += [
-            'chromium/sandbox/win/src/interceptors_64.cc',
-            'chromium/sandbox/win/src/resolver_64.cc',
-            'chromium/sandbox/win/src/service_resolver_64.cc',
-            'chromium/sandbox/win/src/Wow64_64.cc',
-        ]
-    else:
-        security_sandbox_lcppsrcs += [
-            'chromium/sandbox/win/src/resolver_32.cc',
-            'chromium/sandbox/win/src/service_resolver_32.cc',
-            'chromium/sandbox/win/src/sidestep/ia32_modrm_map.cpp',
-            'chromium/sandbox/win/src/sidestep/ia32_opcode_map.cpp',
-            'chromium/sandbox/win/src/sidestep/mini_disassembler.cpp',
-            'chromium/sandbox/win/src/sidestep/preamble_patcher_with_stub.cpp',
-            'chromium/sandbox/win/src/sidestep_resolver.cc',
-            'chromium/sandbox/win/src/Wow64.cc',
-        ]
-
-    security_sandbox_cppsrcs = [
-        '/security/sandbox/%s' % s
-            for s in sorted(security_sandbox_lcppsrcs)
-    ]
deleted file mode 100644
--- a/security/sandbox/staticruntime/moz.build
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- 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/.
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    Library('sandbox_staticruntime_s')
-    FORCE_STATIC_LIB = True
-    USE_STATIC_LIBS = True
-
-    include('../objs.mozbuild')
-    SOURCES += security_sandbox_cppsrcs
-
-    # Bug 1102853 tracks looking at removing this.
-    if CONFIG['CPU_ARCH'] == 'x86_64':
-        SOURCES['/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_client.cc'].no_pgo = True
-
-    for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
-                '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
-        DEFINES[var] = True
-
-    LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
-    LOCAL_INCLUDES += ['/security/sandbox/chromium']
-    LOCAL_INCLUDES += ['/nsprpub']
-
-    DISABLE_STL_WRAPPING = True
-
-    # Suppress warnings in third-party code.
-    if CONFIG['_MSC_VER']:
-        CXXFLAGS += [
-            '-wd4275', # non dll-interface class exception used as base for dll-interface class
-            '-wd4717', # recursive on all control paths, function will cause runtime stack overflow
-            '-wd4996', # 'GetVersionExW': was declared deprecated
-            '-wd4302', # 'reinterpret_cast': truncation from 'LPCSTR' to 'WORD'
-            '-wd4311', # 'reinterpret_cast': pointer truncation from 'X' to 'Y'
-            '-wd4312', # 'reinterpret_cast': conversion from 'DWORD' to 'LPOVERLAPPED' of greater size
-        ]