-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bake should use libtool instead of ar on OSX #176
Comments
I investigated in this issue and tried to naive approach: In `lib/bake/toolchain/clang.rb: if Bake::Utils::OS::name == "Mac"
CLANG_CHAIN[:ARCHIVER][:COMMAND] = "libtool"
CLANG_CHAIN[:ARCHIVER][:ARCHIVE_FLAGS] = "-static -o"
else
CLANG_CHAIN[:ARCHIVER][:COMMAND] = "ar"
CLANG_CHAIN[:ARCHIVER][:ARCHIVE_FLAGS] = "r"
end This works for non cross builds. For the cross compilation use case it's quite common to overwrite the commands for the compilers and the archiver. The archiver could be
In fact the |
Yes, the Flag definition is confusing, but it's hard to change because of breaking too many applications. We need to think about how it should be in future and how we come to this, e.g. by making it deprecated, printing an info log etc... Changing the built-in flags is not possible by intention. It's more than just flags, but e.g. reading out dependency files, parsing compiler messages, etc. I will change the CLANG definition for you as suggested:
|
Will be fixed in next release. |
Fixed in 2.53.0 |
Building a stupid simple binary that depends on a static lib fails on OSX because
ar
can't be used with the latest Xcode clang:Patching the clang toolchain definition helps:
but should be done in a proper host specific way.
The text was updated successfully, but these errors were encountered: