Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ARM64 linux builds. #152

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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