Bug 1410148 - Fully re-enable debug info on mac builds. r=gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 28 Dec 2017 18:01:50 +0900
changeset 714793 6a78cae39cc72d2276dad38fa7c8a02096a60a4a
parent 714792 5acaf18e84b086a95f956defc7328440f69e577d
child 744684 526ed28bc38272e1d8760644f87aaf37cf4f258d
push id94032
push userbmo:mh+mozilla@glandium.org
push dateFri, 29 Dec 2017 23:16:58 +0000
reviewersgps
bugs1410148
milestone59.0a1
Bug 1410148 - Fully re-enable debug info on mac builds. r=gps
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1334,19 +1334,19 @@ js_option(env='RUSTC_OPT_LEVEL',
           nargs=1,
           help='Rust compiler optimization level (-C opt-level=%s)')
 
 # --enable-release kicks in full optimizations.
 imply_option('RUSTC_OPT_LEVEL', '2', when='--enable-release')
 
 
 @depends('RUSTC_OPT_LEVEL', debug_rust, '--enable-debug-symbols',
-         moz_optimize, host, target)
+         moz_optimize)
 def rust_compiler_flags(opt_level_option, debug_rust, debug_symbols,
-                        moz_optimize, host, target):
+                        moz_optimize):
     optimize = moz_optimize.optimize
 
     # Cargo currently supports only two interesting profiles for building:
     # development and release. Those map (roughly) to --enable-debug and
     # --disable-debug in Gecko, respectively.
     #
     # But we'd also like to support an additional axis of control for
     # optimization level. Since Cargo only supports 2 profiles, we're in
@@ -1366,21 +1366,17 @@ def rust_compiler_flags(opt_level_option
         opt_level = '1' if optimize else '0'
 
     # opt-level=0 implies -C debug-assertions, which may not be desired
     # unless Rust debugging is enabled.
     if opt_level == '0' and not debug_rust:
         debug_assertions = False
 
     if debug_symbols:
-        if host.kernel == 'Linux' and target.kernel == 'Darwin':
-            # hack to work around dsymutil failing on cross-OSX builds (bug 1410148)
-            debug_info = '0'
-        else:
-            debug_info = '2'
+        debug_info = '2'
 
     opts = []
 
     if opt_level is not None:
         opts.append('opt-level=%s' % opt_level)
     if debug_assertions is not None:
         opts.append('debug-assertions=%s' %
                     ('yes' if debug_assertions else 'no'))