And this is where we bake (or statically link) the jemalloc lib into the Dgraph binary by passing its path to the C linker via a CGO LDFLAGS directive:
$ go tool cgo | grep ldflags
..
-ldflags flags
Flags to pass to the C linker. The cmd/go tool uses this to pass in the flags in the CGO_LDFLAGS variable.
..