-
Notifications
You must be signed in to change notification settings - Fork 265
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
Use same objects for linking to shared and static libraries. #876
Conversation
Looks great! That came out very clean. My organization requires a minor revision to my Contributor Agreement, for all new contributions. Can you sign the new one I just posted? It's here in the dev branch: |
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
I applied the same idea to some other SuiteSparse libraries and pushed here. It looks like that doesn't work in general though. 😓 |
3487e97
to
a949d97
Compare
… libraries. Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Explicitly compiling with Would that be an ok fix? IIUC, static libraries are built without Edit: I wonder why that wasn't necessary for libamd.so... |
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Oh ... that could be a show-stopper. I think I shouldn't create static libraries with -fPIC. That could really be backward breaking change to the many users of the SuiteSparse static libraries. There's no telling what could break. It seems very dangerous to go down this path. Adding -fPIC to static libraries can make them slower, for example. I think there's a reason that some people want to use static libraries and avoid -fPIC. The reasons might be more than just performance. |
Avoid building all objects twice (for the shared and the static library), effectively reducing the build time approximately by a factor of two.
Something similar could probably be done for most of the SuiteSparse libraries (including GraphBLAS). So, build time could probably be reduced by a lot (when building shared and static libraries).