Bug 55555 - Building assemblies to frameworks ignores LLVM setting
Summary: Building assemblies to frameworks ignores LLVM setting
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: 15.2
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on: 55553
  Show dependency tree
Reported: 2017-04-25 12:32 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-05-09 10:39 UTC (History)
3 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] 2017-04-25 12:32:03 UTC
The LLVM setting is ignored when compiling assemblies to frameworks.

This affects code sharing (by default only SDK assemblies, since by default only SDK assemblies are compiled to frameworks).

* Create sample iOS project
* Select Release|Device configuration.
* Add "-v -v -v -v --assembly-build-target=@sdk=Xamarin.Sdk --assembly-build-target=@all=staticobject" to the additional mtouch arguments.
* Make sure LLVM is enabled in the device configuration.
* Build

* In the build log, --llvm is not passed to the aot compiler for all assemblies.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2017-04-25 12:36:19 UTC
This depends on bug #55553, because fixing this causes bug #55553 to trigger (even though bug #55553 does not seem to be directly related to this problem, since the simplified repro for bug #55553 does not depend on this fix).
Comment 2 Rolf Bjarne Kvinge [MSFT] 2017-04-25 12:38:07 UTC
This fix is required for code sharing to work on watchOS, because LLVM is required to build a publishable package.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-04-25 16:57:31 UTC
I found a workaround for bug #55553, so this is in progress: https://github.com/xamarin/xamarin-macios/pull/2040
Comment 4 Sebastien Pouliot 2017-04-26 12:26:02 UTC
PR 2040 was merged in master https://github.com/xamarin/xamarin-macios/commit/63a67b528711870468c42c256c254c89c81a097c

It needs to be backported to d15-2 before closing the issue.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2017-04-26 14:55:09 UTC
d15-2 PR: https://github.com/xamarin/xamarin-macios/pull/2043
Comment 6 Rolf Bjarne Kvinge [MSFT] 2017-04-26 18:34:24 UTC
fixed in d15-2: https://github.com/xamarin/xamarin-macios/commit/64f084044e987031c8a21a533df1550f0e652794
Comment 7 Roshan Mankani 2017-05-09 10:09:06 UTC
Hello @Rolf Bjarne Kvinge,
The existing steps is not cleared so can you please provide proper steps or description with expected condition for verify this bug.
Comment 8 Rolf Bjarne Kvinge [MSFT] 2017-05-09 10:39:57 UTC
The fix adds a unit test, so there's no need for QA to verify it.