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

build: add BUILDMODE #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

motiejus
Copy link
Contributor

We currently have 2 "popular" kinds of release modes:

  • ReleaseFast without debug symbols. Existing behaviour, will be used to cut releases.
  • ReleaseSafe with debug symbols. New behaviour, will be used for "new nightlies". See ziglang/zig#15194

This script intends to be as prescriptive as possible, so we specifically avoid other valid combinations (e.g. ReleaseSmall). Therefore no such things like unvalidated "extra args" for zig.

If you want to add a new build mode and feel like a wide population would benefit from it, submit a new issue and let's talk.

Example invocation:

$ ./build x86_64-linux-gnu.2.28 baseline ReleaseSafeDbgSym
Build configuration:
Version:       0.11.0-dev.2680+a1aa55ebe
Target:        x86_64-linux-gnu.2.28
MCPU:          baseline
Optimize:      ReleaseSafe
Debug symbols: Yes

<... build output ...>

We currently have 2 "popular" kinds of release modes:

- `ReleaseFast` without debug symbols. Existing behaviour, will be used
  to cut releases.
- `ReleaseSafe` with debug symbols. New behaviour, will be used for
  "new nightlies". See [ziglang/zig#15194][15194]

This script intends to be as prescriptive as possible, so we
specifically avoid other valid combinations (e.g. `ReleaseSmall`).
Therefore no such things like unvalidated "extra args" for zig.

If you want to add a new build mode and feel like a wide population
would benefit from it, submit a new issue and let's talk.

Example invocation:

    $ ./build x86_64-linux-gnu.2.28 baseline ReleaseSafeDbgSym
    Build configuration:
    Version:       0.11.0-dev.2680+a1aa55ebe
    Target:        x86_64-linux-gnu.2.28
    MCPU:          baseline
    Optimize:      ReleaseSafe
    Debug symbols: Yes

    <... build output ...>

[15194]: ziglang/zig#15194
@motiejus
Copy link
Contributor Author

Since I like compressing things and comparing see how well they do it:

$ ls --block-size=K -1sS *.tar.xz | tac
36404K zig-x86_64-linux-musl-baseline-min.tar.xz
40932K zig-x86_64-linux-musl-baseline.tar.xz
53520K zig-x86_64-linux-musl-baseline-dbg.tar.xz

The first one is ReleaseSmall, dependencies compiled with -DCMAKE_BUILD_TYPE=MinSizeRel. The baseline is what we have today (ReleaseFast+strip) and the last one is ReleaseSafe + debug symbols.

ReleaseFastStrip)
OPTIMIZE=ReleaseFast
DBGSYM=No
ZIG_STRIP=-D
Copy link
Sponsor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be -Dstrip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants