[tor-commits] [tor-browser/tor-browser-78.1.0esr-10.0-1] Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander

gk at torproject.org gk at torproject.org
Tue Aug 11 19:43:37 UTC 2020


commit 8ebe00420de77ac6b8814359f6377e133f403494
Author: Mike Hommey <mh+mozilla at glandium.org>
Date:   Tue Aug 11 02:53:34 2020 +0000

    Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander
    
    Differential Revision: https://phabricator.services.mozilla.com/D86649
---
 moz.configure | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/moz.configure b/moz.configure
index f22c7185f300..9b0e78460113 100755
--- a/moz.configure
+++ b/moz.configure
@@ -671,21 +671,30 @@ add_old_configure_assignment(
     'MOZ_DISABLE_ICF', '1', when=depends('--enable-icf')(lambda x: not x))
 
 
- at depends(compile_environment, target)
-def may_strip(compile_environment, target):
-    return compile_environment and target.kernel != 'WINNT'
+js_option('--enable-strip', when=compile_environment,
+          help='Enable stripping of libs & executables')
 
-js_option('--enable-strip', when=may_strip, help='Enable stripping of libs & executables')
+# This should be handled as a `when` once bug 1617793 is fixed.
+ at depends('--enable-strip', c_compiler, when=compile_environment)
+def enable_strip(strip, c_compiler):
+    if strip and c_compiler.type != 'clang-cl':
+        return True
 
-set_config('ENABLE_STRIP', True, when='--enable-strip')
+set_config('ENABLE_STRIP', enable_strip)
 
-js_option('--disable-install-strip', when=may_strip,
+js_option('--disable-install-strip', when=compile_environment,
           help='Enable stripping of libs & executables when packaging')
 
-set_config('PKG_STRIP', True, when='--enable-install-strip')
+# This should be handled as a `when` once bug 1617793 is fixed.
+ at depends('--enable-install-strip', c_compiler, when=compile_environment)
+def enable_install_strip(strip, c_compiler):
+    if strip and c_compiler.type != 'clang-cl':
+        return True
+
+set_config('PKG_STRIP', enable_install_strip)
 
 
- at depends('--enable-strip', '--enable-install-strip', when=may_strip)
+ at depends('--enable-strip', '--enable-install-strip', when=compile_environment)
 def strip(strip, install_strip):
     return strip or install_strip
 



More information about the tor-commits mailing list