{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/2497","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/2497/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/2497/comments","events_url":"https://api.github.com/repos/apple/swift/issues/2497/events","html_url":"https://github.com/apple/swift/pull/2497","id":154557115,"number":2497,"title":"Refactored build-script-impl for cross-compiling support","user":{"login":"karwa","id":5254025,"avatar_url":"https://avatars.githubusercontent.com/u/5254025?v=3","gravatar_id":"","url":"https://api.github.com/users/karwa","html_url":"https://github.com/karwa","followers_url":"https://api.github.com/users/karwa/followers","following_url":"https://api.github.com/users/karwa/following{/other_user}","gists_url":"https://api.github.com/users/karwa/gists{/gist_id}","starred_url":"https://api.github.com/users/karwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karwa/subscriptions","organizations_url":"https://api.github.com/users/karwa/orgs","repos_url":"https://api.github.com/users/karwa/repos","events_url":"https://api.github.com/users/karwa/events{/privacy}","received_events_url":"https://api.github.com/users/karwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"gribozavr","id":1120569,"avatar_url":"https://avatars.githubusercontent.com/u/1120569?v=3","gravatar_id":"","url":"https://api.github.com/users/gribozavr","html_url":"https://github.com/gribozavr","followers_url":"https://api.github.com/users/gribozavr/followers","following_url":"https://api.github.com/users/gribozavr/following{/other_user}","gists_url":"https://api.github.com/users/gribozavr/gists{/gist_id}","starred_url":"https://api.github.com/users/gribozavr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gribozavr/subscriptions","organizations_url":"https://api.github.com/users/gribozavr/orgs","repos_url":"https://api.github.com/users/gribozavr/repos","events_url":"https://api.github.com/users/gribozavr/events{/privacy}","received_events_url":"https://api.github.com/users/gribozavr/received_events","type":"User","site_admin":false},"milestone":null,"comments":57,"created_at":"2016-05-12T19:02:23Z","updated_at":"2016-05-28T05:34:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/2497","html_url":"https://github.com/apple/swift/pull/2497","diff_url":"https://github.com/apple/swift/pull/2497.diff","patch_url":"https://github.com/apple/swift/pull/2497.patch"},"body":"<!-- Please complete this template before creating pull request. -->\r\n#### What's in this pull request?\r\n<!-- Description about pull request. -->\r\nIn the current build-script-impl, we use the variable name \"deployment_target\" pretty loosely when talking about the Build, Host and Target of the products we're building. You can see this in places - like where the test phase iterates every STDLIB_DEPLOYMENT_TARGET (i.e. Target), before skipping those which are not, effectively, host platforms, so we're tripping up on all these types of \"deployment targets\" floating around.\r\n\r\nI'm aware the build script is being rewritten in python. The rewrite is approaching the stage where it's going to be getting to some of the points I've addressed here (e.g. calculating stdlib targets), so I think it's a good idea if we get this done first, so the python implementation can consider it from the start.\r\n\r\nThis PR replaces uses of \"deployment_target\" with \"host\" when talking about a platform which will ultimately host a Swift compiler. The Build platform is implicitly a Host. It replaces uses of \"deployment_target\" with \"stdlib_target\" when talking about a platform for which the stdlib is to be built. This terminology is consistent with the actual swift/llvm build process: `llvm_host_triple`, `SWIFT_HOST_VARIANT_*` and host-related flags get set `set_build_options_for_host` instead of `set_deployment_target_options`, and `SWIFT_STDLIB_TARGETS` calculation has been moved to a function - `calculate_targets_for_host`.\r\n\r\n- `SWIFT_STDLIB_TARGETS` now gets recalculated for each host we build, as it should.\r\n- Executables are always searched for in the `LOCAL_HOST` (Build machine) products\r\n- Some switching on 'uname' with switches on the host, in support of future cross-compiling\r\n- Removed lipo step (it lipos stuff between hosts, which doesn't make sense - possibly a result of confused terminology again?)\r\n\r\n_Note_: The diff is large because of things like moving the stdlib target calculation in to a function and relocating it to be close to the function which sets the host options. The actual changes are not that extreme, and really limited to some variable renaming, function encapsulation and moving.\r\n\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n **Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->\r\n\r\n- Use consistent terminology for target platforms, disambiguate uses of\r\n  'deployment_target'\r\n- Calculate targets per host, in preparation for cross-compiling\r\n- Only use executables from LOCAL_HOST\r\n- Only execute testable targets of the LOCAL_HOST\r\n- Remove some cases of switching on 'uname' in preparation for\r\n  cross-compiling"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/222291421","html_url":"https://github.com/apple/swift/pull/2497#issuecomment-222291421","issue_url":"https://api.github.com/repos/apple/swift/issues/2497","id":222291421,"user":{"login":"gribozavr","id":1120569,"avatar_url":"https://avatars.githubusercontent.com/u/1120569?v=3","gravatar_id":"","url":"https://api.github.com/users/gribozavr","html_url":"https://github.com/gribozavr","followers_url":"https://api.github.com/users/gribozavr/followers","following_url":"https://api.github.com/users/gribozavr/following{/other_user}","gists_url":"https://api.github.com/users/gribozavr/gists{/gist_id}","starred_url":"https://api.github.com/users/gribozavr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gribozavr/subscriptions","organizations_url":"https://api.github.com/users/gribozavr/orgs","repos_url":"https://api.github.com/users/gribozavr/repos","events_url":"https://api.github.com/users/gribozavr/events{/privacy}","received_events_url":"https://api.github.com/users/gribozavr/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T05:34:30Z","updated_at":"2016-05-28T05:34:30Z","body":"> While I was changing the build presets, it occurred to me that we never even used to use the `TOOLCHAIN_PREFIX` parameter\r\n\r\nI think we were.  From https://ci.swift.org/job/oss-swift-package-osx/1704/consoleText:\r\n\r\n```\r\nBuild settings from command line:\r\n    LLDB_TOOLCHAIN_PREFIX = /Applications/Xcode.app/Contents/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-05-26-a.xctoolchain\r\n```\r\n\r\nBut that's a total lie, the toolchain does not end up being installed there.  Given that, I think something about LLDB should have changed since the time when this option was introduced.\r\n\r\n/CC @scallanan: what do you think?"}}
{"actor":{"display_login":"gribozavr"}}