commit 37513b27be64c149480cfb50e6030bf6ca3b16db Author: Mike Hommey mh+mozilla@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 4be2a8d0276b..10442889cd34 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))
-@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. +@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. +@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)
-@depends('--enable-strip', '--enable-install-strip', when=may_strip) +@depends('--enable-strip', '--enable-install-strip', when=compile_environment) def strip(strip, install_strip): return strip or install_strip
tbb-commits@lists.torproject.org