Skip to content

Commit

Permalink
Add build-static.sh, and update local development instruction
Browse files Browse the repository at this point in the history
Signed-off-by: Yucong Sun <sunyucong@gmail.com>
  • Loading branch information
thefallentree authored and danobi committed Nov 6, 2021
1 parent ae3f629 commit d78f040
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ For additional help / discussion, please use our [discussions](https://github.co

## Development

### Docker

For build & test directly in docker

```
$ ./build.sh
```

For build in docker then test directly on host

```
$ ./build-static.sh
$ ./build-static/src/bpftrace
$ ./build-static/testing/bpftrace_test
```

### Vagrant

For development and testing a [Vagrantfile](Vagrantfile) is available.

Make sure you have the `vbguest` plugin installed, it is required to correctly
Expand Down
7 changes: 7 additions & 0 deletions build-static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -eu
export BASE=ubuntu-glibc
export LLVM_VERSION=12
export RUN_TESTS=0
./build-docker-image.sh
docker run --network host --rm -it -u $(id -u):$(id -g) -v $(pwd):$(pwd) -e STATIC_LINKING=ON -e STATIC_LIBC=OFF -e ALLOW_UNSAFE_PROBE=OFF -e VENDOR_GTEST=ON -e RUN_TESTS=${RUN_TESTS} -e EMBED_USE_LLVM=ON bpftrace-builder-${BASE} "$(pwd)/build-static" Release "$@"

0 comments on commit d78f040

Please sign in to comment.