-
Couldn't load subscription status.
- Fork 1.4k
Build: create static libraries explicitly with libtool. #5948
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
|
@swift-ci please smoke test |
This matches the implementation of the static linker in swift-driver, which always adds the explicit `-static`. https://github.com/apple/swift-driver/blob/caa81e560362a4e14034cd4502114d03e45ea261/Sources/SwiftDriver/Jobs/DarwinToolchain%2BLinkerSupport.swift#L95-L102
72427ee to
b090688
Compare
|
Modify the test that checks the correct command line is used. Sorry about forgetting that. |
|
@swift-ci please smoke test |
|
Is the error in Swift Test Linux Platform related? |
|
@swift-ci smoke test Linux |
|
@swift-ci smoke test windows |
|
Every platform seems to be green. Is this good to merge? |
|
I believe so, thanks @drodriguez! |
|
should we add (or modify) a test for this? |
The existing test was modified to also expect the |
Always pass the
-staticparameter, instead of relying on the default oflibtool.Motivation:
This matches the implementation of the static linker in swift-driver, which always adds the explicit
-static.https://github.com/apple/swift-driver/blob/caa81e560362a4e14034cd4502114d03e45ea261/Sources/SwiftDriver/Jobs/DarwinToolchain%2BLinkerSupport.swift#L95-L102
Additionally, this improves the compatibility with LLVM's libtool, which does not (intentionally) default to static libraries (it defaults to do nothing).
Modifications:
Adds a new parameter
-staticfor every invocation oflibtoolto create static libraries in Darwin.Result:
The internal invocation of libtool always uses the
-static. No changes should be experienced, since this is the default for cctools'libtool./cc @compnerd as the author of #5720 which added the usage of
libtool