Skip to content
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

Add grocksdb_no_link build flag to remove builtin link flags #106

Merged
merged 1 commit into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ libs:

.PHONY: test
test:
go test -v -count=1 -tags testing
go test -v -count=1 -tags testing,grocksdb_no_link
4 changes: 3 additions & 1 deletion non_builtin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//go:build !testing && !grocksdb_clean_link
//go:build !grocksdb_no_link && !grocksdb_clean_link

// The default link options, to customize it, you can try build tag `grocksdb_clean_link` for a cleaner set of flags,
// or `grocksdb_no_link` where you have full control through `CGO_LDFLAGS` environment variable.
package grocksdb

// #cgo LDFLAGS: -lrocksdb -pthread -lstdc++ -ldl -lm -lzstd -llz4 -lz -lsnappy
Expand Down
2 changes: 1 addition & 1 deletion non_builtin_clean_link.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !testing && grocksdb_clean_link
//go:build !grocksdb_no_link && grocksdb_clean_link

package grocksdb

Expand Down