diff options
| author | chrislu <chris.lu@gmail.com> | 2022-04-21 01:22:38 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-04-21 01:22:38 -0700 |
| commit | 4aa39ef33f89936709c7a169ec09c7dad71c5e9f (patch) | |
| tree | 9eaf2459c538a17b09aaaf3a8aee416eddac226a | |
| parent | 3885374edf80c5c07551c2a43948614b98936fe5 (diff) | |
| download | seaweedfs-4aa39ef33f89936709c7a169ec09c7dad71c5e9f.tar.xz seaweedfs-4aa39ef33f89936709c7a169ec09c7dad71c5e9f.zip | |
conditionally compile sqlite
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | weed/filer/sqlite/doc.go | 9 | ||||
| -rw-r--r-- | weed/filer/sqlite/sqlite_store.go | 3 | ||||
| -rw-r--r-- | weed/filer/sqlite/sqlite_store_unsupported.go | 4 |
4 files changed, 14 insertions, 4 deletions
@@ -8,4 +8,4 @@ install: cd weed; go install full_install: - cd weed; go install -tags "elastic gocdk" + cd weed; go install -tags "elastic gocdk sqlite" diff --git a/weed/filer/sqlite/doc.go b/weed/filer/sqlite/doc.go new file mode 100644 index 000000000..833addf54 --- /dev/null +++ b/weed/filer/sqlite/doc.go @@ -0,0 +1,9 @@ +/* + +Package sqlite is for sqlite filer store. + +The referenced "modernc.org/sqlite" library is too big when compiled. +So this is only compiled in "make full_install". + +*/ +package sqlite diff --git a/weed/filer/sqlite/sqlite_store.go b/weed/filer/sqlite/sqlite_store.go index ca9d38786..70a4bf390 100644 --- a/weed/filer/sqlite/sqlite_store.go +++ b/weed/filer/sqlite/sqlite_store.go @@ -1,5 +1,6 @@ -//go:build linux || darwin || windows +//go:build (linux || darwin || windows) && sqlite // +build linux darwin windows +// +build sqlite // limited GOOS due to modernc.org/libc/unistd diff --git a/weed/filer/sqlite/sqlite_store_unsupported.go b/weed/filer/sqlite/sqlite_store_unsupported.go index 0fba1ea33..351d2e501 100644 --- a/weed/filer/sqlite/sqlite_store_unsupported.go +++ b/weed/filer/sqlite/sqlite_store_unsupported.go @@ -1,5 +1,5 @@ -//go:build !linux && !darwin && !windows && !s390 && !ppc64le && !mips64 -// +build !linux,!darwin,!windows,!s390,!ppc64le,!mips64 +//go:build !linux && !darwin && !windows && !s390 && !ppc64le && !mips64 && !sqlite +// +build !linux,!darwin,!windows,!s390,!ppc64le,!mips64,!sqlite // limited GOOS due to modernc.org/libc/unistd |
