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

Simplify tetra and tetragon build without CGO, add binary stripping and improve Makefile #1268

Merged
merged 3 commits into from
Jul 24, 2023

Commits on Jul 24, 2023

  1. tetra: simplify Linux build

    Previously tetra on Linux was importing the tracingpolicy package that
    was importing pkg/bpf which was using CGO. The CGO dependency was
    removed so we don't need to split between dynamic and static compilation
    anymore.
    
    Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
    mtardy committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    2cda733 View commit details
    Browse the repository at this point in the history
  2. Makefile: remove unused targets, add docs, various cleanup

    - use JOBS on the local BPF build
    - remove docs aliases
    - remove image-clang-arm because the clang is multi-arch
    - document options of the Makefile
    - move variables set to the top of the file
    
    Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
    mtardy committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    0f25492 View commit details
    Browse the repository at this point in the history
  3. Makefile: simplify Go build targets

    Build a common GO_BUILD variable to be used by all target building Go
    progs. Also add binary stripping by default as it doesn't affect late
    debugging (stack traces and gops) and reduce the size of binaries:
    approximately tetra 37Mo -> 25Mo and tetragon 74Mo -> 51Mo.
    Use new option DEBUG=1 to remove optimizations and stripping.
    
    Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
    mtardy committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    ca59980 View commit details
    Browse the repository at this point in the history