Skip to content
Snippets Groups Projects
Commit 8ebe0042 authored by Mike Hommey's avatar Mike Hommey Committed by Georg Koppen
Browse files

Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander

parent 904d2bbe
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment