summaryrefslogtreecommitdiff
path: root/git_static.go
AgeCommit message (Collapse)Author
2020-06-21Revamp the ways in which the library can be built (#621)lhchavez
This change allows to link the system version of libgit2 statically. Since `-tags static` is already used for the bundled version of the library and to avoid breaking old workflows, `-tags static,system_libgit2` is now used to select that. This means that the valid combinations are: | Flag | Effect | |-------------------------------|-----------------------------------------------| | _No flags_ | Dynamically-linked against the system libgit2 | | `-tags static,system_libgit2` | Statically-linked against the system libgit2 | | `-tags static` | Statically-linked against the bundled libgit2 | Note that there is no way to express dynamically linking against the bundled libgit2 because that makes very little sense, since the binaries wouldn't be able to be distributed. If that's still desired, the `PKG_CONFIG_PATH` environment variable can set before building the code. [`Makefile`](https://github.com/libgit2/git2go/blob/master/Makefile) has an example of how it is used in the CI.
2020-04-02Uprev vendor/libgit2 to v1.0lhchavez
This uprevs libgit2 to the latest and greatest.
2020-03-04Uprev vendor/libgit2 to v0.99lhchavez
This uprevs libgit2 to the latest and greatest.
2019-02-11Uprev vendored libgit2 to v0.28lhchavez
New version is here!
2019-01-05Improve the static build scriptlhchavez
This change: * Uses the installed version of both the library and the pkgconfig file, which fixes path resolution on Ubuntu Xenial. * Uses quoting liberally so that paths with spaces in them are correctly handled. * Moves the build+install directories to static-build/ in the git2go repository to avoid having a dirty vendor/libgit2 checkout.
2018-08-23static: use pkg-config exclusively when using itRyan Graham
When using the static linking option on platforms that use pkg-config, use ONLY pkg-config to get the CFLAGS and LDFLAGS. This prevents pulling in dependencies and flags for any non-vendored version that may be present on the host. The main practical effect of this is that if someone doesn't need/want any sort of remote access support at all they can completely disable libcurl, libssh2, libssl, etc and produce a smaller/simpler binary and greatly simplify their build-time dependencies. When done properly, the generated pkg-config file will tell cgo everything it needs to know. This also prevents confusion if there is a system copy of libgit2 that is being given priority over the vendored build. Signed-off-by: Ryan Graham <[email protected]>
2018-02-22Switch over the version contraints to v0.27Carlos Martín Nieto
2017-09-03Update vendored libgit2 to latestCarlos Martín Nieto
2017-04-14Allow building statically via the "static" build tagCarlos Martín Nieto