mirror of
https://github.com/kairos-io/openamt.git
synced 2025-09-25 20:35:21 +00:00
simplify linking of rpc library
This commit is contained in:
@@ -49,7 +49,7 @@ build:
|
|||||||
COPY +amt-rpc-lib/librpc.so /usr/local/lib/librpc.so
|
COPY +amt-rpc-lib/librpc.so /usr/local/lib/librpc.so
|
||||||
COPY +amt-rpc-lib/librpc.h /usr/local/include/librpc.h
|
COPY +amt-rpc-lib/librpc.h /usr/local/include/librpc.h
|
||||||
|
|
||||||
RUN go build -o agent-provider-amt cmd/main.go && upx agent-provider-amt
|
RUN go build -ldflags "-linkmode 'external'" -o agent-provider-amt cmd/main.go && upx agent-provider-amt
|
||||||
|
|
||||||
SAVE ARTIFACT agent-provider-amt AS LOCAL artifacts/agent-provider-amt
|
SAVE ARTIFACT agent-provider-amt AS LOCAL artifacts/agent-provider-amt
|
||||||
|
|
||||||
|
@@ -3,8 +3,7 @@
|
|||||||
package amtrpc
|
package amtrpc
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -I./src
|
#cgo LDFLAGS: -L/usr/local/lib -lrpc -Wl,-rpath=/usr/local/lib
|
||||||
#cgo LDFLAGS: -L./lib -lrpc -Wl,-rpath=./lib
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "librpc.h"
|
#include "librpc.h"
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user