diff options
| -rw-r--r-- | classes/go-mod-discovery.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/go-mod-discovery.bbclass b/classes/go-mod-discovery.bbclass index 87cd9def..fc7c2008 100644 --- a/classes/go-mod-discovery.bbclass +++ b/classes/go-mod-discovery.bbclass | |||
| @@ -205,7 +205,11 @@ Hint: Set GO_MOD_DISCOVERY_SRCDIR to the directory containing go.mod" | |||
| 205 | BUILD_CMD="${BUILD_CMD} -tags \"${TAGS}\"" | 205 | BUILD_CMD="${BUILD_CMD} -tags \"${TAGS}\"" |
| 206 | fi | 206 | fi |
| 207 | BUILD_CMD="${BUILD_CMD} -ldflags \"${GO_MOD_DISCOVERY_LDFLAGS}\"" | 207 | BUILD_CMD="${BUILD_CMD} -ldflags \"${GO_MOD_DISCOVERY_LDFLAGS}\"" |
| 208 | BUILD_CMD="${BUILD_CMD} -o \"${GO_MOD_DISCOVERY_OUTPUT}\" ${GO_MOD_DISCOVERY_BUILD_TARGET}" | 208 | |
| 209 | # When building multiple packages (./... or multiple targets), go build | ||
| 210 | # requires the output to be a directory. Create the directory and use it. | ||
| 211 | mkdir -p "${GO_MOD_DISCOVERY_OUTPUT}" | ||
| 212 | BUILD_CMD="${BUILD_CMD} -o \"${GO_MOD_DISCOVERY_OUTPUT}/\" ${GO_MOD_DISCOVERY_BUILD_TARGET}" | ||
| 209 | 213 | ||
| 210 | echo "Executing: ${BUILD_CMD}" | 214 | echo "Executing: ${BUILD_CMD}" |
| 211 | eval ${BUILD_CMD} | 215 | eval ${BUILD_CMD} |
