Skip to content

Conversation

@hughbe
Copy link
Contributor

@hughbe hughbe commented Dec 27, 2016

  • CMark is called cmark.lib on Windows
  • Clang is called libClang*.lib on Windows

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

This is rather unfortunate that we need to do this. I don't see a better way though.

@compnerd
Copy link
Member

CC @llvm-beanz in case you see a better way (other than re-architecting the cross-compilation)

@compnerd
Copy link
Member

compnerd commented Jan 3, 2017

@swift-ci please test and merge

1 similar comment
@compnerd
Copy link
Member

compnerd commented Jan 3, 2017

@swift-ci please test and merge

@compnerd
Copy link
Member

compnerd commented Jan 7, 2017

@swift-ci please test linux platform

@slavapestov slavapestov merged commit cc867af into swiftlang:master Jan 9, 2017
@hughbe hughbe deleted the windows-dependencies branch January 9, 2017 09:03
@llvm-beanz
Copy link
Contributor

I have a really crazy idea that we might be able to use to make some of this stuff simpler. It would be very non-traditional CMake, but it might make this world better in the short term.

Long term, as I've said before, Swift needs to stop fighting with CMake's cross-compilation strategy.

Short term, I think we might be able to streamline some of the platform handling goop with a few convenience wrappers. But we'd have to be careful to do it only in places where the platform-handling code can be placed in its own scope.

What I'm thinking here is that we could do something like:

if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS") include(Windows) else() include(UNIX) endif() set(dep "${LLVM_LIBRARY_OUTPUT_INTDIR}/${dep}.${CMAKE_STATIC_LIBRARY_SUFFIX}")

I believe that doing this in an isolated scope (inside a function) should be safe, and it would allow for more generic code.

We could even abstract the if block into a macro for re-use.

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