Skip to content

Commit

Permalink
Enable ARM64 linux builds. (oras-project#152)
Browse files Browse the repository at this point in the history
Signed-off-by: Sajay Antony <[email protected]>
  • Loading branch information
sajayantony authored Mar 3, 2020
1 parent 237ac92 commit fb588f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
14 changes: 11 additions & 3 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,33 @@ All code under the `pkg/` directory should be thoroughly tested.

## Building binary

Use `make test` to build all platofrm binaries to the `bin/` directory.
Use `make build` to build all platofrm binaries to the `bin/` directory.

Mac:

```
```bash
# builds to bin/darwin/amd64/oras
make build-mac
```

Linux:

```bash
# builds to bin/linux/amd64/oras
make build-linux
```

Linux ARM64:

```bash
# builds to bin/linux/amd64/oras
make build-linux
```


Windows:

```
```bash
# builds to bin/windows/amd64/oras.exe
make build-windows
```
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ clean:
git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf

.PHONY: build
build: build-linux build-mac build-windows
build: build-linux build-linux-arm64 build-mac build-windows

.PHONY: build-linux
build-linux:
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/amd64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-linux-arm64
build-linux-arm64:
GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/arm64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-mac
build-mac:
GOARCH=amd64 CGO_ENABLED=0 GOOS=darwin go build -v --ldflags="$(LDFLAGS)" \
Expand Down

0 comments on commit fb588f7

Please sign in to comment.