mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D86649
This commit is contained in:
parent
6714f1ec83
commit
99910cc0ff
@ -671,21 +671,29 @@ 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', 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)
|
||||
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',
|
||||
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)
|
||||
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')
|
||||
def strip(strip, install_strip):
|
||||
return strip or install_strip
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user