{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/51348839","id":51348839,"diff_hunk":"@@ -0,0 +1,25 @@\n+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n+// file at the top-level directory of this distribution and at\n+// http://rust-lang.org/COPYRIGHT.\n+//\n+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n+// option. This file may not be copied, modified, or distributed\n+// except according to those terms.\n+\n+use target::Target;\n+\n+pub fn target() -> Target {\n+    Target {\n+        llvm_target: \"mipsel-unknown-linux-musl\".to_string(),\n+        target_endian: \"little\".to_string(),\n+        target_pointer_width: \"32\".to_string(),\n+        arch: \"mips\".to_string(),","path":"src/librustc_back/target/mipsel_unknown_linux_musl.rs","position":18,"original_position":18,"commit_id":"7b026f0355a5394358e6a9758185db8eec850e0f","original_commit_id":"7b026f0355a5394358e6a9758185db8eec850e0f","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"Oh interesting! That may be a bug in the target triple, however, depending on how you look at it. Either that or we may just want to make sure that we're consistent. Some data points:\r\n\r\n* The newly-added `powerpc64le-unknown-linux-gnu` triple has `powerpc64le` as the `target_arch`.\r\n* There's some `cfg(target_arch = \"mipsel\")` directives in the standard library, which apparently are doing nothing.\r\n* We don't necessarily require the arch in the triple to equal the arch in `target_arch`, for example `armv7` recently added has the `target_arch` of `arm`.\r\n\r\nI think that I'd prefer to lean towards leaving this as `mips` and tweaking the `powerpc64le` triple to have `powerpc64` as the `target_arch`. That seems the most consistent to me and also the most ergonomic. The two triples can still be differentiated by looking at `target_endian`","created_at":"2016-01-30T18:38:40Z","updated_at":"2016-01-30T18:38:40Z","html_url":"https://github.com/rust-lang/rust/pull/31298#discussion_r51348839","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/31298","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/51348839"},"html":{"href":"https://github.com/rust-lang/rust/pull/31298#discussion_r51348839"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/31298"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/31298","id":57723462,"html_url":"https://github.com/rust-lang/rust/pull/31298","diff_url":"https://github.com/rust-lang/rust/pull/31298.diff","patch_url":"https://github.com/rust-lang/rust/pull/31298.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/31298","number":31298,"state":"open","locked":false,"title":"[blocked] add support for mips(el)-unknown-linux-musl","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"body":"This target covers MIPS devices that run the trunk version of OpenWRT.\r\n\r\nThe x86_64-unknown-linux-musl target always links statically to C libraries. For\r\nthe mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of\r\nother targets do) to keep binary size down.\r\n\r\nAs for the C compiler flags used in the build system, we use the same flags used\r\nfor the mips(el)-unknown-linux-gnu target.\r\n\r\n---\r\n\r\nThis is blocked on rust-lang-nursery/libc#163. Once that lands a few things need to be updated in this PR. I'll leave comments in the diff about what needs to be done.\r\n\r\nr? @alexcrichton ","created_at":"2016-01-30T00:56:49Z","updated_at":"2016-01-30T18:38:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"caad780f533c89d04f78369f81b4601e4bf9dbe8","assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/31298/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/31298/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/31298/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/7b026f0355a5394358e6a9758185db8eec850e0f","head":{"label":"japaric:mips-musl","ref":"mips-musl","sha":"7b026f0355a5394358e6a9758185db8eec850e0f","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"repo":{"id":17873870,"name":"rust","full_name":"japaric/rust","owner":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/japaric/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/japaric/rust","forks_url":"https://api.github.com/repos/japaric/rust/forks","keys_url":"https://api.github.com/repos/japaric/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/japaric/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/japaric/rust/teams","hooks_url":"https://api.github.com/repos/japaric/rust/hooks","issue_events_url":"https://api.github.com/repos/japaric/rust/issues/events{/number}","events_url":"https://api.github.com/repos/japaric/rust/events","assignees_url":"https://api.github.com/repos/japaric/rust/assignees{/user}","branches_url":"https://api.github.com/repos/japaric/rust/branches{/branch}","tags_url":"https://api.github.com/repos/japaric/rust/tags","blobs_url":"https://api.github.com/repos/japaric/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/japaric/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/japaric/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/japaric/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/japaric/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/japaric/rust/languages","stargazers_url":"https://api.github.com/repos/japaric/rust/stargazers","contributors_url":"https://api.github.com/repos/japaric/rust/contributors","subscribers_url":"https://api.github.com/repos/japaric/rust/subscribers","subscription_url":"https://api.github.com/repos/japaric/rust/subscription","commits_url":"https://api.github.com/repos/japaric/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/japaric/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/japaric/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/japaric/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/japaric/rust/contents/{+path}","compare_url":"https://api.github.com/repos/japaric/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/japaric/rust/merges","archive_url":"https://api.github.com/repos/japaric/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/japaric/rust/downloads","issues_url":"https://api.github.com/repos/japaric/rust/issues{/number}","pulls_url":"https://api.github.com/repos/japaric/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/japaric/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/japaric/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/japaric/rust/labels{/name}","releases_url":"https://api.github.com/repos/japaric/rust/releases{/id}","deployments_url":"https://api.github.com/repos/japaric/rust/deployments","created_at":"2014-03-18T16:51:45Z","updated_at":"2015-03-12T03:58:05Z","pushed_at":"2016-01-29T23:52:26Z","git_url":"git://github.com/japaric/rust.git","ssh_url":"git@github.com:japaric/rust.git","clone_url":"https://github.com/japaric/rust.git","svn_url":"https://github.com/japaric/rust","homepage":"http://www.rust-lang.org","size":277208,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"074f49a350f22b6f33890cd105b2ebe2c790ee3c","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2016-01-30T17:29:59Z","pushed_at":"2016-01-30T17:34:08Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":467289,"stargazers_count":15171,"watchers_count":15171,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2956,"mirror_url":null,"open_issues_count":2345,"forks":2956,"open_issues":2345,"watchers":15171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/31298"},"html":{"href":"https://github.com/rust-lang/rust/pull/31298"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/31298"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/31298/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/31298/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/31298/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/7b026f0355a5394358e6a9758185db8eec850e0f"}}}}