Skip to content

Commit

Permalink
cunative: Only pull in native deps with a tag (#211)
Browse files Browse the repository at this point in the history
* cunative: Only pull in native deps with a tag

* only run decode_snap_test with cunative tag
  • Loading branch information
magik6k authored Oct 16, 2024
1 parent 99cb61d commit 4452678
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ deps: $(BUILD_DEPS)

## ldflags -s -w strips binary

curio: GOFLAGS+=-tags=cunative
curio: $(BUILD_DEPS)
rm -f curio
GOAMD64=v3 CGO_LDFLAGS_ALLOW=$(CGO_LDFLAGS_ALLOW) $(GOCC) build $(GOFLAGS) -o curio -ldflags " -s -w \
Expand Down
2 changes: 2 additions & 0 deletions lib/ffi/cunative/decode_sdr.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cunative

package cunative

/*
Expand Down
2 changes: 2 additions & 0 deletions lib/ffi/cunative/decode_snap.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cunative

package cunative

/*
Expand Down
2 changes: 2 additions & 0 deletions lib/ffi/cunative/decode_snap_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cunative

package cunative

import (
Expand Down
2 changes: 2 additions & 0 deletions lib/ffi/cunative/decode_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cunative

package cunative

import (
Expand Down
19 changes: 19 additions & 0 deletions lib/ffi/cunative/nonative.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//go:build !cunative

package cunative

import (
"io"

"github.com/ipfs/go-cid"

"github.com/filecoin-project/go-state-types/abi"
)

func DecodeSnap(spt abi.RegisteredSealProof, commD, commK cid.Cid, key, replica io.Reader, out io.Writer) error {
panic("DecodeSnap: cunative build tag not enabled")
}

func Decode(replica, key io.Reader, out io.Writer) error {
panic("Decode: cunative build tag not enabled")
}

0 comments on commit 4452678

Please sign in to comment.