Skip to content

Conversation

@compnerd
Copy link
Member

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

CC: @Rostepher @gottesmm

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 52fab37c11de09f5df9ef48de3d4b19e70ebbd9f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 52fab37c11de09f5df9ef48de3d4b19e70ebbd9f

@compnerd compnerd force-pushed the simplify-add-library branch from 52fab37 to ba77955 Compare September 24, 2018 05:12
@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 52fab37c11de09f5df9ef48de3d4b19e70ebbd9f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 52fab37c11de09f5df9ef48de3d4b19e70ebbd9f

Hoist out the some of the architecture independent variables outside of
the inner loop.  This should simplify the logic for the function and
improve generation times.  (NFC)
The entire if block is in the `SWIFTLIB_TARGET_LIBRARY` condition, so
these checks add nothing but a level of indentation.  (NFC)
@compnerd compnerd force-pushed the simplify-add-library branch from ba77955 to 05bf903 Compare September 24, 2018 17:55
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @Rostepher
For some context around the motivation here, I'm looking to split up the add_swift_library into add_swift_library and add_swift_target_library because the current thing is extremely complex and nigh upon impossible to follow.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ba77955972a33d37cff6ff6aa91e55c12b95ba3a

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ba77955972a33d37cff6ff6aa91e55c12b95ba3a

@compnerd
Copy link
Member Author

Bleh, the precondition check isnt working ... I'm not sure why; I guess we can deal with that simplification later.

Merge two cases into a single case rather than keeping them separate.
Additionally check the condition early rather than perform the action
and then revert it.  NFC.
@compnerd compnerd force-pushed the simplify-add-library branch from 05bf903 to 7974e39 Compare September 24, 2018 18:31
Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

One quick thing that I want verified by @zisko and @Rostepher. Beyond that, LGTM

set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
if(${sdk} STREQUAL IOS_SIMULATOR)
if(${name} STREQUAL swiftMediaPlayer)
# message("DISABLING AUTOLINK FOR swiftMediaPlayer")
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if you should comment this out. I think this caused problems in the past and the logging was meant to provide info if this happened.

@zisko @Rostepher is this useful for you guys? If not, we should just delete this line.

@gottesmm
Copy link
Contributor

Actually, sorry just just read the first commit. Sorry! I need to review the rest.

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 05bf903c711bc17aa8a3e6bdba2c6c4ebf2f58d4

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 05bf903c711bc17aa8a3e6bdba2c6c4ebf2f58d4

@gottesmm
Copy link
Contributor

The rest of the patches look ok to me as well.

@Rostepher Rostepher changed the title Simplify add library [CMake] Simplify add_swift_library Sep 24, 2018
@compnerd compnerd merged commit 9a04225 into swiftlang:master Sep 24, 2018
@compnerd compnerd deleted the simplify-add-library branch September 24, 2018 21:47
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.

5 participants