Skip to content

Commit d3e93f3

Browse files
author
Sriram Melkote
committed
MB-23969: Temporary workaround to allow 1.7.3 to work on OSX 10.12.4
OSX 10.12.4 debug symbols breaks go 1.7.3 binaries. Temporarily add -s flag to strip debug info. Revert this commit when we move to 1.8.1 See golang/go#19734 Change-Id: I8d777c82841c75c6b1b28f6b7d69690b93e5fb87
1 parent 1ad4d32 commit d3e93f3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ IF (APPLE)
1111
# On OS X 10.11 (El Capitan) upwards we can no longer use DYLD_LIBRARY_PATH to locate
1212
# runtime dependancies. Instead add the location of forestdb etc to the actual
1313
# binary itself.
14-
SET (_ldflags "-extldflags '-Wl,-rpath,@executable_path/../lib'")
14+
15+
# TODO: Spock GA
16+
# Temporarily adding -s flag to allow 1.7.3 to work on OSX 10.12.4
17+
# Remove -s flag (which strips debug info) when we move to 1.8.1
18+
# See https://github.com/golang/go/issues/19734
19+
20+
SET (_ldflags "-s -extldflags '-Wl,-rpath,@executable_path/../lib'")
1521
ENDIF ()
1622

1723
SET (_indexer_ldflags "${_ldflags}")
@@ -50,16 +56,21 @@ GoInstall (TARGET projector PACKAGE github.com/couchbase/indexing/secondary/cmd/
5056
CGO_INCLUDE_DIRS "${CGO_INCLUDE_DIRS}"
5157
CGO_LIBRARY_DIRS "${CGO_LIBRARY_DIRS}"
5258
GOTAGS "${TAGS}"
59+
LDFLAGS "${_indexer_ldflags}"
5360
INSTALL_PATH bin
5461
GOVERSION 1.7.3)
5562

5663
GoInstall (TARGET cbindex PACKAGE github.com/couchbase/indexing/secondary/cmd/cbindex
5764
GOPATH "${PROJECT_SOURCE_DIR}/../../../.." "${GODEPSDIR}"
65+
GOTAGS "${TAGS}"
66+
LDFLAGS "${_indexer_ldflags}"
5867
INSTALL_PATH bin
5968
GOVERSION 1.7.3)
6069

6170
GoInstall (TARGET cbindexperf PACKAGE github.com/couchbase/indexing/secondary/cmd/cbindexperf
6271
GOPATH "${PROJECT_SOURCE_DIR}/../../../.." "${GODEPSDIR}"
72+
GOTAGS "${TAGS}"
73+
LDFLAGS "${_indexer_ldflags}"
6374
INSTALL_PATH bin
6475
GOVERSION 1.7.3)
6576

@@ -75,5 +86,7 @@ GoInstall (TARGET cbindexplan PACKAGE github.com/couchbase/indexing/secondary/cm
7586

7687
GoInstall(TARGET plasma_dump PACKAGE github.com/couchbase/nitro/cmd/plasma_dump
7788
GOPATH "${CMAKE_SOURCE_DIR}/goproj" "${GODEPSDIR}"
89+
GOTAGS "${TAGS}"
90+
LDFLAGS "${_indexer_ldflags}"
7891
INSTALL_PATH bin OUTPUT plasma_dump
7992
GOVERSION 1.7.3)

0 commit comments

Comments
 (0)