forked from rook/rook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bassam Tabbara
committed
Aug 8, 2016
1 parent
7632264
commit 41bf52a
Showing
5 changed files
with
102 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ tools/ | |
vendor/ | ||
|
||
.vscode/ | ||
.glide/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Building | ||
|
||
Castle is golang binary that uses cgo to interface with embedded ceph. The ceph | ||
project is a submodule of castle and is built from the top level Makefile. | ||
|
||
## Static binary | ||
|
||
This is the easiest option and produced static binaries for castled and tools. These | ||
binaries can easily be used inside minimal or scratch containers, or run on minimal | ||
linux distributions like CoreOS. | ||
|
||
``` | ||
make STATIC=1 build | ||
``` | ||
|
||
## Dyanmic binary | ||
|
||
If you dont want to distribute a static binary, a dynamically linked binary is | ||
supported. The approach we take is to link most of the glibc binaries dynamically | ||
and the rest of the libraries continue to be linked statically. Ceph has a lot | ||
of dependencies and we take this approach to simplify the distribution. | ||
|
||
``` | ||
make STATIC=0 build | ||
``` | ||
|
||
## Hardedened binary (PIE) | ||
|
||
You can build a Position Independent executable as follows: | ||
|
||
``` | ||
make STATIC=0 PIE=1 build | ||
``` | ||
|
||
## Switching Allocators | ||
|
||
Using a different memory allocator can impact the overall performance of the system. | ||
Three allocators are currently supported: jemalloc, tcmalloc and libc. To specify | ||
an allocator during the build run the following: | ||
|
||
``` | ||
make ALLOCATOR=jemalloc build | ||
``` | ||
|
||
## Debug Builds | ||
|
||
To build a binary with debug symbols run the following: | ||
|
||
``` | ||
make DEBUG=1 build | ||
``` | ||
|
||
Note the binary will be significantly larger in size. | ||
|
||
## Verbose Builds | ||
|
||
To turn on verbose build output run the following | ||
|
||
``` | ||
make DEBUG=1 build | ||
``` | ||
|
||
## Parallel Builds | ||
|
||
You can speed up the build significantly by passing the -j flag to make as follows: | ||
|
||
``` | ||
make -j4 build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ceph
updated
from f1f191 to 56131a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters