{"action":"created","comment":{"url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments/65930076","id":65930076,"diff_hunk":"@@ -41,7 +41,20 @@ Overridable MSBuild properties include:\n     * `x86`\n     * `x86_64`\n \n-    The default value is `armeabi-v7a`.\n+    Addtionally there are a set of \"host\" values. The \"host ABI\" is used\n+    to build mono for the *currently executing operating system*, in\n+    particular to build the base class libraries such as `mscorlib.dll`.\n+    There can also be support for cross-compiling mono for a different\n+    host, e.g. to build Windows `libmonosgen-2.0.dll` from OS X.\n+    Supported host values include:\n+\n+    * `host-Darwin`\n+    * `host-Linux`\n+    * `host-win64`: Cross-compile Windows 64-bit binaries from Unix.\n+\n+    The default value is `host-$(HostOS);armeabi-v7a`, where `$(HostOS)`\n+    is based on probing various environment variables and filesystem locations.\n+    On OS X, the default would be `host-Darwin;armeabi-v7a`.","path":"README.md","position":18,"original_position":18,"commit_id":"44e2abadc8bf945d7b1524240809d81d9afcec83","original_commit_id":"44e2abadc8bf945d7b1524240809d81d9afcec83","user":{"login":"radical","id":1472,"avatar_url":"https://avatars.githubusercontent.com/u/1472?v=3","gravatar_id":"","url":"https://api.github.com/users/radical","html_url":"https://github.com/radical","followers_url":"https://api.github.com/users/radical/followers","following_url":"https://api.github.com/users/radical/following{/other_user}","gists_url":"https://api.github.com/users/radical/gists{/gist_id}","starred_url":"https://api.github.com/users/radical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radical/subscriptions","organizations_url":"https://api.github.com/users/radical/orgs","repos_url":"https://api.github.com/users/radical/repos","events_url":"https://api.github.com/users/radical/events{/privacy}","received_events_url":"https://api.github.com/users/radical/received_events","type":"User","site_admin":false},"body":"Same as above","created_at":"2016-06-06T17:17:30Z","updated_at":"2016-06-06T17:17:30Z","html_url":"https://github.com/xamarin/xamarin-android/pull/55#discussion_r65930076","pull_request_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments/65930076"},"html":{"href":"https://github.com/xamarin/xamarin-android/pull/55#discussion_r65930076"},"pull_request":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55","id":72741492,"html_url":"https://github.com/xamarin/xamarin-android/pull/55","diff_url":"https://github.com/xamarin/xamarin-android/pull/55.diff","patch_url":"https://github.com/xamarin/xamarin-android/pull/55.patch","issue_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/55","number":55,"state":"open","locked":false,"title":"[mxe] Add Windows cross-compiler support.","user":{"login":"jonpryor","id":155958,"avatar_url":"https://avatars.githubusercontent.com/u/155958?v=3","gravatar_id":"","url":"https://api.github.com/users/jonpryor","html_url":"https://github.com/jonpryor","followers_url":"https://api.github.com/users/jonpryor/followers","following_url":"https://api.github.com/users/jonpryor/following{/other_user}","gists_url":"https://api.github.com/users/jonpryor/gists{/gist_id}","starred_url":"https://api.github.com/users/jonpryor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonpryor/subscriptions","organizations_url":"https://api.github.com/users/jonpryor/orgs","repos_url":"https://api.github.com/users/jonpryor/repos","events_url":"https://api.github.com/users/jonpryor/events{/privacy}","received_events_url":"https://api.github.com/users/jonpryor/received_events","type":"User","site_admin":false},"body":"Certain Xamarin.Android features require that Mono be built for\r\nWindows, e.g. the [AOT compilers][aot] require a build of mono that\r\nexecutes on Windows to generate the AOT native libraries.\r\n\r\nUnfortunately, building Mono on Windows continues to be a massive\r\nPITA. (Autotools on Windows requires Cygwin/mingw, running shell\r\nscripts on Windows is painfully slow, it's all brittle, etc.)\r\n\r\nTo work around this pain, we instead build the Mono/Windows binaries\r\non OS X, via [MXE][mxe], which produces a gcc-based cross-compiler\r\nwhich generates Windows binaries and is executable from Unix.\r\nThis in turn requires that we have MXE, so add a\r\n`_CreateMxeToolchains` target to `android-toolchain.targets` which\r\nwill build MXE. The installation prefix for MXE can be overridden via\r\nthe new `$(AndroidMxeInstallPrefix)` MSBuild property; it defaults to\r\n`$HOME/android-toolchain/mxe`.\r\n\r\nRework the `$(AndroidSupportedAbis)` MSBuild property so that it\r\nmust include the \"host\" ABI, and add support for a new `host-win64`\r\nvalue which will use MXE to generate 64-bit Windows binaries for\r\nlibmonosgen-2.0.dll and libMonoPosixHelper.dll.\r\n\r\nWe can't always process `host-$(HostOS)` because of an xbuild bug.\r\nThe scenario is that if you want to just build `host-win64`, the\r\nobvious thing to do is:\r\n\r\n\tcd build-tools/mono-runtimes\r\n\txbuild /p:AndroidSupportedAbis=host-win64\r\n\r\nAlas, if `host-$(HostOS)` is always processed, this inexplicably\r\ncauses `host-$(HostOS)` to be re-rebuilt, which (1) is a waste of\r\ntime, and (2) fails -- inexplicably -- in the `_BuildRuntimes` target\r\nbecause make(1) thinks that the configure flags have somehow changed,\r\nwhich currently makes no sense at all. (When can we move to MSBuild?)\r\n\r\nChanging `$(AndroidSupportedAbis)` so that `host-$(HostOS)` is\r\nexplicitly processed instead of implicitly processed allows working\r\naround the above xbuild bug, as `host-$(HostOS)` won't be implicitly\r\nprocessed on every build, but only when required.\r\n\r\nAdditionally, we add a new <Which/> MSBuild task so that we can\r\ndetermine of a particular process is in `$PATH`. This is useful\r\nbecuase listing requirements within README.md is a road to pain --\r\ne.g. xxd(1) is required to build `src/monodroid` but if it's missing\r\nit'll still *build* but you'll instead get a *linker* failure because\r\nthe `monodroid_config` and `monodroid_machine_config` symbols aren't\r\npresent. Building MXE requires that even more programs be present\r\nwithin $PATH, so explicitly check for these so that *useful* error\r\nmessages can be generated instead of obscure ones.\r\n\r\nFinally, a note about autotools and generating Windows native\r\nlibraries: creation of `.dll` files *requires* that an appropriate\r\nobjdump be present so it can determine if e.g. `libkernel32.a` is an\r\nimport library or an archive. If `x86_64-w64-mingw32.static-objdump`\r\nisn't found -- e.g. because $PATH doesn't contain it -- then no `.dll`\r\nfiles will be created, and much head scratching will occur.\r\n\r\nTo rectify this, override the OBJDUMP and DLLTOOL values when invoking\r\n`configure` so that that full paths are used and `$PATH` use is\r\nreduced.  (Who wants `x86_64-w64-mingw32.static-objdump` in `$PATH`?)\r\n\r\n[aot]: https://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#AOT_Support\r\n[mxe]: http://mxe.cc/","created_at":"2016-06-06T16:48:55Z","updated_at":"2016-06-06T17:17:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3c2cab23530fe0661d79be45b571deb935c13e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55/commits","review_comments_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55/comments","review_comment_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/55/comments","statuses_url":"https://api.github.com/repos/xamarin/xamarin-android/statuses/44e2abadc8bf945d7b1524240809d81d9afcec83","head":{"label":"jonpryor:jonp-mxe","ref":"jonp-mxe","sha":"44e2abadc8bf945d7b1524240809d81d9afcec83","user":{"login":"jonpryor","id":155958,"avatar_url":"https://avatars.githubusercontent.com/u/155958?v=3","gravatar_id":"","url":"https://api.github.com/users/jonpryor","html_url":"https://github.com/jonpryor","followers_url":"https://api.github.com/users/jonpryor/followers","following_url":"https://api.github.com/users/jonpryor/following{/other_user}","gists_url":"https://api.github.com/users/jonpryor/gists{/gist_id}","starred_url":"https://api.github.com/users/jonpryor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonpryor/subscriptions","organizations_url":"https://api.github.com/users/jonpryor/orgs","repos_url":"https://api.github.com/users/jonpryor/repos","events_url":"https://api.github.com/users/jonpryor/events{/privacy}","received_events_url":"https://api.github.com/users/jonpryor/received_events","type":"User","site_admin":false},"repo":{"id":57242763,"name":"xamarin-android","full_name":"jonpryor/xamarin-android","owner":{"login":"jonpryor","id":155958,"avatar_url":"https://avatars.githubusercontent.com/u/155958?v=3","gravatar_id":"","url":"https://api.github.com/users/jonpryor","html_url":"https://github.com/jonpryor","followers_url":"https://api.github.com/users/jonpryor/followers","following_url":"https://api.github.com/users/jonpryor/following{/other_user}","gists_url":"https://api.github.com/users/jonpryor/gists{/gist_id}","starred_url":"https://api.github.com/users/jonpryor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonpryor/subscriptions","organizations_url":"https://api.github.com/users/jonpryor/orgs","repos_url":"https://api.github.com/users/jonpryor/repos","events_url":"https://api.github.com/users/jonpryor/events{/privacy}","received_events_url":"https://api.github.com/users/jonpryor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonpryor/xamarin-android","description":"","fork":true,"url":"https://api.github.com/repos/jonpryor/xamarin-android","forks_url":"https://api.github.com/repos/jonpryor/xamarin-android/forks","keys_url":"https://api.github.com/repos/jonpryor/xamarin-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonpryor/xamarin-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonpryor/xamarin-android/teams","hooks_url":"https://api.github.com/repos/jonpryor/xamarin-android/hooks","issue_events_url":"https://api.github.com/repos/jonpryor/xamarin-android/issues/events{/number}","events_url":"https://api.github.com/repos/jonpryor/xamarin-android/events","assignees_url":"https://api.github.com/repos/jonpryor/xamarin-android/assignees{/user}","branches_url":"https://api.github.com/repos/jonpryor/xamarin-android/branches{/branch}","tags_url":"https://api.github.com/repos/jonpryor/xamarin-android/tags","blobs_url":"https://api.github.com/repos/jonpryor/xamarin-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonpryor/xamarin-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonpryor/xamarin-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonpryor/xamarin-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonpryor/xamarin-android/statuses/{sha}","languages_url":"https://api.github.com/repos/jonpryor/xamarin-android/languages","stargazers_url":"https://api.github.com/repos/jonpryor/xamarin-android/stargazers","contributors_url":"https://api.github.com/repos/jonpryor/xamarin-android/contributors","subscribers_url":"https://api.github.com/repos/jonpryor/xamarin-android/subscribers","subscription_url":"https://api.github.com/repos/jonpryor/xamarin-android/subscription","commits_url":"https://api.github.com/repos/jonpryor/xamarin-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonpryor/xamarin-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonpryor/xamarin-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonpryor/xamarin-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonpryor/xamarin-android/contents/{+path}","compare_url":"https://api.github.com/repos/jonpryor/xamarin-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonpryor/xamarin-android/merges","archive_url":"https://api.github.com/repos/jonpryor/xamarin-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonpryor/xamarin-android/downloads","issues_url":"https://api.github.com/repos/jonpryor/xamarin-android/issues{/number}","pulls_url":"https://api.github.com/repos/jonpryor/xamarin-android/pulls{/number}","milestones_url":"https://api.github.com/repos/jonpryor/xamarin-android/milestones{/number}","notifications_url":"https://api.github.com/repos/jonpryor/xamarin-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonpryor/xamarin-android/labels{/name}","releases_url":"https://api.github.com/repos/jonpryor/xamarin-android/releases{/id}","deployments_url":"https://api.github.com/repos/jonpryor/xamarin-android/deployments","created_at":"2016-04-27T19:46:01Z","updated_at":"2016-04-27T19:46:03Z","pushed_at":"2016-06-06T16:48:40Z","git_url":"git://github.com/jonpryor/xamarin-android.git","ssh_url":"git@github.com:jonpryor/xamarin-android.git","clone_url":"https://github.com/jonpryor/xamarin-android.git","svn_url":"https://github.com/jonpryor/xamarin-android","homepage":null,"size":4048,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xamarin:master","ref":"master","sha":"41bbf80aac9f39279d1ff808feaf247c4885a081","user":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"repo":{"id":55075302,"name":"xamarin-android","full_name":"xamarin/xamarin-android","owner":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xamarin/xamarin-android","description":"","fork":false,"url":"https://api.github.com/repos/xamarin/xamarin-android","forks_url":"https://api.github.com/repos/xamarin/xamarin-android/forks","keys_url":"https://api.github.com/repos/xamarin/xamarin-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xamarin/xamarin-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xamarin/xamarin-android/teams","hooks_url":"https://api.github.com/repos/xamarin/xamarin-android/hooks","issue_events_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/events{/number}","events_url":"https://api.github.com/repos/xamarin/xamarin-android/events","assignees_url":"https://api.github.com/repos/xamarin/xamarin-android/assignees{/user}","branches_url":"https://api.github.com/repos/xamarin/xamarin-android/branches{/branch}","tags_url":"https://api.github.com/repos/xamarin/xamarin-android/tags","blobs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xamarin/xamarin-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/xamarin/xamarin-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xamarin/xamarin-android/statuses/{sha}","languages_url":"https://api.github.com/repos/xamarin/xamarin-android/languages","stargazers_url":"https://api.github.com/repos/xamarin/xamarin-android/stargazers","contributors_url":"https://api.github.com/repos/xamarin/xamarin-android/contributors","subscribers_url":"https://api.github.com/repos/xamarin/xamarin-android/subscribers","subscription_url":"https://api.github.com/repos/xamarin/xamarin-android/subscription","commits_url":"https://api.github.com/repos/xamarin/xamarin-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/xamarin/xamarin-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/xamarin/xamarin-android/contents/{+path}","compare_url":"https://api.github.com/repos/xamarin/xamarin-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xamarin/xamarin-android/merges","archive_url":"https://api.github.com/repos/xamarin/xamarin-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xamarin/xamarin-android/downloads","issues_url":"https://api.github.com/repos/xamarin/xamarin-android/issues{/number}","pulls_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls{/number}","milestones_url":"https://api.github.com/repos/xamarin/xamarin-android/milestones{/number}","notifications_url":"https://api.github.com/repos/xamarin/xamarin-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xamarin/xamarin-android/labels{/name}","releases_url":"https://api.github.com/repos/xamarin/xamarin-android/releases{/id}","deployments_url":"https://api.github.com/repos/xamarin/xamarin-android/deployments","created_at":"2016-03-30T15:37:14Z","updated_at":"2016-06-06T14:16:47Z","pushed_at":"2016-06-06T16:48:55Z","git_url":"git://github.com/xamarin/xamarin-android.git","ssh_url":"git@github.com:xamarin/xamarin-android.git","clone_url":"https://github.com/xamarin/xamarin-android.git","svn_url":"https://github.com/xamarin/xamarin-android","homepage":null,"size":4140,"stargazers_count":520,"watchers_count":520,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":4,"forks":90,"open_issues":4,"watchers":520,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55"},"html":{"href":"https://github.com/xamarin/xamarin-android/pull/55"},"issue":{"href":"https://api.github.com/repos/xamarin/xamarin-android/issues/55"},"comments":{"href":"https://api.github.com/repos/xamarin/xamarin-android/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/xamarin/xamarin-android/statuses/44e2abadc8bf945d7b1524240809d81d9afcec83"}}}}
{"actor":{"display_login":"radical"}}