Skip to content

Enable Foundation to build against a new libicu #1144

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

Closed
wants to merge 1 commit into from
Closed

Enable Foundation to build against a new libicu #1144

wants to merge 1 commit into from

Conversation

djones6
Copy link
Contributor

@djones6 djones6 commented Jul 31, 2017

The Swift build system has existing support for building a new version of ICU, via the --libicu flag, or by specifying the libicu=true and install-libicu targets in a preset.

It may be desirable to be able to do this on Linux in order to match the version of ICU used on the OSX platform, for two reasons:

However, the plumbing to make Foundation build against the newly built libicu is missing: it currently picks up the system version, which causes the build to fail with messages such as:

../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/Locale.subproj/CFCalendar.c.o: In function `__CFCalendarCreateUCalendar':
CoreFoundation/Locale.subproj/CFCalendar.c:(.text+0x15f): undefined reference to `ucal_open_55'
../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/Locale.subproj/CFCalendar.c.o: In function `_CFCalendarIsWeekend':
CoreFoundation/Locale.subproj/CFCalendar.c:(.text+0x1eb): undefined reference to `ucal_isWeekend_55'

This PR adds the necessary flags to build against the new libicu. I replicated the style of the existing solution for the Dispatch libraries.

This has no prereqs, however changes to the build-script (swiftlang/swift#11266) are required before it will have any effect.

@spevans
Copy link
Contributor

spevans commented Jul 31, 2017

You may find this old unmerged PR of mine does the same thing: #722

the swift build script is already passing the info through using pkg-config and it was already working for the LDFLAGS, it just needed the CFLAGS updating

@djones6
Copy link
Contributor Author

djones6 commented Jul 31, 2017

@spevans You're right - and your solution is far simpler. Thanks for the heads up!

@djones6 djones6 closed this Jul 31, 2017
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.

2 participants