Bug 29112 - [msbuild] There's no way to skip native strip / dsymutil in release builds
Summary: [msbuild] There's no way to skip native strip / dsymutil in release builds
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.10
Hardware: PC Mac OS
: --- normal
Target Milestone: 8.10.1 (C5SR1)
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2015-04-15 07:16 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2015-05-01 10:25 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2015-04-15 07:16:17 UTC
It used to be possible to add --nosymbolstrip and --dsym:false as an extra mtouch argument to skip these, but that no longer works.

Test case:
* Select Release|Device configuration for a Unified app.
* Add "--nosymbolstrip --dsym:false" to the additional mtouch arguments
* Build project.

Look at the build log to see that 'strip' and 'dsymutil' are called:

>	Target _GenerateDebugSymbols:
>		DSymUtil Task
>		  AppBundleDir: bin/iPhone/Release/instruments.app
>		  Architectures: ARMv7
>		  DSymDir: bin/iPhone/Release/instruments.app.dSYM
>		  Executable: bin/iPhone/Release/instruments.app/instruments
>		Tool /usr/bin/dsymutil execution started with arguments: --arch=armv7 -t 4 -z -o bin/iPhone/Release/instruments.app.dSYM bin/iPhone/Release/instruments.app/instruments 
>		SymbolStrip Task
>		  Executable: bin/iPhone/Release/instruments.app/instruments
>		  SymbolFile: obj/iPhone/Release/mtouch-symbols.list
>		Tool /usr/bin/strip execution started with arguments: -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/instruments.app/instruments 
>		/Applications/Xcode63.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: removing global symbols from a final linked no longer supported.  Use -exported_symbols_list at link time when building: /Users/rolf/Projects/unified-test-app/bin/iPhone/Release/instruments.app/instruments
>		DSymIndexer Task
>		  DSymDir: bin/iPhone/Release/instruments.app.dSYM
>		Tool /usr/bin/mdimport execution started with arguments: bin/iPhone/Release/instruments.app.dSYM
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-04-17 13:15:21 UTC

maccore/master: 960dd60a7534a4d78e68a222ad9706e77ef6d649
Comment 4 Dylan Kelly 2015-04-23 14:55:01 UTC
Confirmed bug in Xamarin.iOS Version:

Verified fix in Xamarin.iOS Version:
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-04-29 08:03:27 UTC

maccore/macios-cycle5: c87c6264c5010073c7549ecdeceee3894bfc127a
Comment 6 Sunil Kumar 2015-04-30 14:05:09 UTC
I have checked this issue with master XI and it's working fine with this build. It skips both native strip and dsymutil.

This is the build output with master XI 

Then I have checked this issue with Cycle 5 latest XI and observed that it skip native "dsymutil" but not skip "symbolstrip" in Release|Device configuration.

Screencast: http://www.screencast.com/t/e7DEjnvJcP
Build Output: https://gist.github.com/sunil360/f1c9c451db99a7c1a3e9

As per my understanding build output of Cycle 5 XI build should be similar to master XI build i.e. both native "dsymutil" and "symbolstrip" should be skipped in Release|Device configuration.

As of now I am reopening this issue. Please let me know if I misunderstood any thing.

Comment 7 Rolf Bjarne Kvinge [MSFT] 2015-05-01 02:49:09 UTC
A missing commit was identified and backported.

maccore/macios-cycle5: d5342565df85b5b6dd4b09d041bfb87b2f3cb1a7
Comment 8 Sunil Kumar 2015-05-01 10:25:35 UTC
I have checked this issue and now this issue working fine with XI it skips both native "dsymutil" and "symbolstrip" in Release|Device configuration. 

Screencast: http://www.screencast.com/t/WUDc5E9ud
Build Output: https://gist.github.com/sunil360/e908bffcfe11fea9d673

It shows the same build output as getting with master: https://gist.github.com/sunil360/5f9e62860e07ad545c97

Hence I am closing this issue.