Skip to content

Object formats #3137

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

Merged
merged 2 commits into from
Jun 22, 2016
Merged

Object formats #3137

merged 2 commits into from
Jun 22, 2016

Conversation

compnerd
Copy link
Member

What's in this pull request?

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The 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:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

compnerd referenced this pull request Jun 22, 2016
gold only supports ELF.  This adds two new helper functions
(is_windows_based_sdk and is_elfish_sdk) to ensure that we dont try to use gold
on non-ELF targets.  This comes up when trying to setup cross-compilation for
the standard library for Windows.

The ELF check is implemented as the negation of Darwin (which uses MachO) and
Windows (which uses COFF).  The reason for this is that there are additional
targets which also use ELF.  Rather than enumerating the larger set, enumerate
the smaller set (windows) and use the negation.
@@ -103,8 +102,7 @@ add_swift_library(section_magic_end OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE

set(object_target_list)
foreach(sdk ${SWIFT_CONFIGURED_SDKS})
is_elfish_sdk("${sdk}" IS_ELFISH)
if(IS_ELFISH)
if("${SWIFT_SDK_${sdk}_OBJECT_FORMAT}" STREQUAL "ELF")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just loop ${ELFISH_SDKS}?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that would be smart and why I had put EFLISH_SDKS into the top level scope. I knew I had forgotten some part of the change. Thanks for pointing that out.

@gribozavr
Copy link
Contributor

Cygwin calls configure_sdk_unix, would that be a problem?

@compnerd
Copy link
Member Author

I think that this will only cause a problem with cross-compiling on a Linux host for cygwin or if you try to use the gold linker on cygwin. I guess in the configure_sdk_unix we should check if its cygwin and set it to COFF (I will be adding a configure_sdk_windows which will also set it to COFF).

compnerd added 2 commits June 22, 2016 09:37
Simplify the ELF checks based on review comments from Dimitri Gribenko.
@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@swift-ci swift-ci merged commit 6f22343 into swiftlang:master Jun 22, 2016
@compnerd compnerd deleted the object-formats branch June 22, 2016 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants