-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Simplify ICU package resolution not to require PkgConfig and to be more user configurable. #6461
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
Conversation
# Find required dependencies. | ||
# | ||
|
||
find_package(ICU REQUIRED COMPONENTS uc i18n) |
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.
Hmm, this seems a bit odd, since Darwin doesn't need this.
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.
Yeah, my bad - I've changed the conditions to match the old ones
@swift-ci please test |
CC: @llvm-beanz |
Build failed |
Build failed |
@@ -795,6 +795,13 @@ message(STATUS " Leak Detection Checker Entrypoints: ${SWIFT_RUNTIME_ENABLE_LEA | |||
message(STATUS "") | |||
|
|||
# | |||
# Find required dependencies. | |||
# | |||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AMD "${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "") |
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.
AMD
-> AND
?
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.
Yeah, I realised this as I was doing my local build - derp
Thanks, though!
@swift-ci please test |
…re user configurable. If you don't have PkgConfig, you'll need to pass the following to CMake: ``` -DICU_UC_INCLUDE_DIRS="%swift_source_dir%/icu/include"^ -DICU_UC_LIBRARY_DIRS="%swift_source_dir%/icu/lib64"^ -DICU_I18N_INCLUDE_DIRS="%swift_source_dir%/icu/include"^ -DICU_I18N_LIBRARY_DIRS="%swift_source_dir%/icu/lib64"^ -DICU_UC_LIB_NAME="icuuc"^ -DICU_I18N_LIB_NAME="icuin" ``` icu
@swift-ci Please smoke test |
Build failed |
@slavapestov could you retrigger Swift Test OSX Platform, seems like it failed any tests failing! |
@swift-ci please test OS X platform |
Build failed |
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 think that this isn't any worse than the status quo. The changes to the FindICUPackage are an improvement. I'm not sure that I see a good way to handle cross compiling on Darwin in the current state. But since overall its about the same...
# Find required dependencies. | ||
# | ||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND "${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "") | ||
find_package(ICU REQUIRED COMPONENTS uc i18n) |
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.
Technically, this won't work with a Darwin + cross compile scenario.
Hmm, im no expert at the cross-compilation stuff. I'm fairly sure the FreeBSD port that got merged yesterday solved a similar case. |
Also, not sure if I'm breaking the OSX tests or they just keep failing - it says 0 failures but something seems to be going wrong? |
I think @aschwaighofer reverted the change that caused this (it's failing in some Playground Logger tests) @swift-ci please test OS X platform. |
Build failed |
@CodaFi Unfortunately reverting that change did not fix the playground test failure, it looks like it was unrelated. The test has been disabled in master so I'm kicking off another PR test run. |
Actually, the smoke test passed so we can just merge. |
If you don't have PkgConfig, you'll need to pass the following to CMake:
I moved the
find_package
logic toCMakeLists.txt
. This is because I get linker errors for no such ICU functions when linking on Windows, because a library needs ICU, but ICU has not been resolved yet untilstdlib/public/core/CMakeLists.txt
Extracted from #5904