-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[build-script] There can only be one host target #948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build-script] There can only be one host target #948
Conversation
|
The only case for multiple host targets that I can think of is simultaneous 32- and 64-bit support. I don't think we use that anywhere today (in particular, Swift doesn't support 32-bit OS X). If we do need it we can probably say 64-bit is native and 32-bit is cross or something. |
Aha, of course! Thanks for pointing that out.
Agreed. I'm hoping to expand the concept of "compilation targets" in upcoming pull requests, particularly to support cross-compilation from OS X to Linux ARM. |
|
Right, parallel 32 and 64 bit Linux builds was the motivation for using a list here. |
22d143f to
2411f6d
Compare
utils/build-script-impl
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed this hard-coded path, so I amended the commit to remove it as well.
|
@gribozavr Do you think this is a reasonable approach for now? Or would you prefer something that would make it easier to add parallel 32- and 64-bit builds in the future? |
53276a1 to
ca0f7ea
Compare
|
@gribozavr Friendly ping! I'd greatly appreciate feedback on what I could change here, or whether this isn't something you'd be interested in merging. 🙇 |
ca0f7ea to
8ec280d
Compare
|
@gribozavr Any other feedback? (Aside from this change no longer merges cleanly) |
|
@modocache Sorry for the delayed response! The patch LGTM, please rebase to the current master, and I'll merge, thank you! |
`build-script-impl` currently maintains a list of `NATIVE_TOOLS_DEPLOYMENT_TARGETS` -- host machine targets, for which the resulting binaries can be run on the current machine. However, there is only ever *one* host machine. This commit: - Changes the `NATIVE_TOOLS_DEPLOYMENT_TARGETS` list parameter into a single string parameter, `HOST_TARGET`. - Promotes the logic to detect the host target to Python, and places it in the `swift_build_support` module. - Removes the hard-coded "macosx_x86_64" path to the LLVM and Clang TableGen -- thereby unblocking future work to make cross-compilation possible on platforms other than OS X. - Also promotes cross-compilation target validation to Python, placing it in the `swift_build_support` module.
8ec280d to
c1a746b
Compare
|
@gribozavr Not at all! I'm grateful for the review. I've updated and did another local test run; this appears to be working fine and is ready to be merged. |
|
Thank you! |
[build-script] There can only be one host target
What's in this pull request?
build-script-implcurrently maintains a list ofNATIVE_TOOLS_DEPLOYMENT_TARGETS-- host machine targets, for which the resulting binaries can be run on the current machine.However, there is only ever one host machine. This commit:
NATIVE_TOOLS_DEPLOYMENT_TARGETSlist parameter into a single string parameter,HOST_TARGET.swift_build_supportmodule.swift_build_supportmodule.Why merge this pull request?
build-script-impllogic out of the shellscript and into Python.What downsides are there to merging this pull request?
NATIVE_TOOLS_DEPLOYMENT_TARGETSfrom a list to a single element. I don't think there is any need multiple host targets, but I may be misunderstanding something.