Skip to content

SR-2280: swiftc -static-stdlib option fails on Linux #5269

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

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Oct 13, 2016

This change makes the -static-stdlib option on linux/ELF platforms link in more static libraries where possible to produce binaries that arent dependant on libraries not installed by default. Currently this is just libicu.a, libicui18n.a and libicudata.a if these can be found

Resolves SR-2280

  • Create a file of linker arguments instead of a hardcoded
    list in ToolChains.cpp for use by -static-stdlib option
  • Try and link in more static libs in preference to dynamic
    ones for packages not normally installed by default,
    eg libicu

@MaxDesiatov
Copy link
Contributor

any updates on this PR? CI checks seem to be stuck

@slavapestov
Copy link
Contributor

Hi @spevans, sorry, this one slipped through the cracks. Do you mind rebasing and fixing merge conflicts so we can get this merged in?

@erg Can you look over the cmake bits?

- Link in static version of libicu if available in preference to
  the dynamic library when using the -static-stdlib option.
@spevans
Copy link
Contributor Author

spevans commented Jan 11, 2017

@slavapestov Ive rebased this PR. A lot of the CMake changes have already gone in as part of #5394 so this PR just updates the utils/gen-static-stdlib-link-args script that creates static-stdlib-args.lnk

@erg
Copy link
Contributor

erg commented Jan 12, 2017

LGTM.

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

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