Skip to content
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

Install libDispatchStubs.a if building static libraries. #489

Merged
merged 1 commit into from
May 30, 2019

Conversation

spevans
Copy link
Contributor

@spevans spevans commented May 27, 2019

No description provided.

@spevans
Copy link
Contributor Author

spevans commented May 27, 2019

@swift-ci test


if(NOT BUILD_SHARED_LIBS)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_${library_kind}_LIBRARY_PREFIX}DispatchStubs${CMAKE_${library_kind}_LIBRARY_SUFFIX}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are in a NOT BUILD_SHARED_LIBS case, we can simplify this:

${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}/DispatchStubs${CMAKE_STATIC_LIBRARY_SUFFIX}

which can be simplified to:

$<TARGET_FILE:DispatchStubs>

@spevans spevans force-pushed the pr_install_dispatch_stubs branch from cf3f813 to fae0282 Compare May 27, 2019 19:57
@spevans
Copy link
Contributor Author

spevans commented May 27, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented May 30, 2019

cc @ktopley-apple

@ktopley-apple
Copy link
Contributor

Did you mean "if NOT building static libraries"?

@spevans
Copy link
Contributor Author

spevans commented May 30, 2019

libDispatchStubs.a is needed by libswiftDispatch.a but only if we ARE building static libraries

@ktopley-apple
Copy link
Contributor

libDispatchStubs.a is needed by libswiftDispatch.a but only if we ARE building static libraries

So why is the test for NOT BUILD_SHARED_LIBS?

    if(NOT BUILD_SHARED_LIBS)

@spevans
Copy link
Contributor Author

spevans commented May 30, 2019

Because NOT BUILD_SHARED_LIBS == BUILD_STATIC_LIBS but there is no BUILD_STATIC_LIBS flag unfortunately

@ktopley-apple
Copy link
Contributor

Because NOT BUILD_SHARED_LIBS == BUILD_STATIC_LIBS but there is no BUILD_STATIC_LIBS flag unfortunately

Oh, that was so obvious. For some reason, I was reading that as NOT BUILD_STATIC_LIBS :-)

@ktopley-apple ktopley-apple merged commit e8d020e into apple:master May 30, 2019
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
Install libDispatchStubs.a if building static libraries.

Signed-off-by: Kim Topley <ktopley@apple.com>
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.

3 participants