gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

Demonstrate how to use the same object files for multiple links #1018

Open ThadHouse opened 5 years ago

ThadHouse commented 5 years ago

We have a software model build, where we use 1 base component to build all the objects, and then other components to actually link those objects together. We do this because we have 3 different output types we have to support.

Static Library Shared Library with Static Dependencies Shared Library with Shared Dependencies.

We originally had these as 3 separate components, but this cause our build times to skyrocket, because everything got built 3 times. So we used the base component, and then just linked with other components.