Skip to content

Commit

Permalink
Change default build type to "minsize"
Browse files Browse the repository at this point in the history
People (and distros) have been building ksh from this project using the
default "debug" build type since we switched from Nmake to Meson. That
results in a ksh program whose performance is far from optimal. So change
the default build type. If a debugging enabled binary is needed, such as
in a CI environment, it must be requested explicitly.

Related #1449
  • Loading branch information
krader1961 committed Jan 31, 2020
1 parent 43d1853 commit db54d36
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

## Notable fixes and improvements

- The default build type is now "minsize" since that dramatically improves the
performance of ksh. You can still request a debug build via `meson
--buildtype=debug` (issue #1449).
- Fix `history` command behavior when the *~/.sh_history* file has
specific content (issue #1432).
- A ${.sh.install_prefix}/config.ksh file will be sourced if it exists. It is
Expand Down
7 changes: 6 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
project('ksh93', 'c', default_options: [
project('ksh9', 'c', default_options: [
# This is the optimal production build type for this project. If you need
# a debug build you must explicitly run `meson --buildtype=debug`. This
# helps ensure that each distro (or user) gets a performance optimized build
# even if they don't know to add the `--buildtype=minsize` option.
'buildtype=minsize',
'b_lundef=false',
'default_library=static',
'c_std=c99', # we require the C99 (aka ISO9899:1999) language standard
Expand Down
3 changes: 2 additions & 1 deletion scripts/build-on-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ mkdir build
cd build

echo ==== Configuring the build
if ! meson -Dwarnings-are-errors=true --prefix="$(mktemp -dt ksh.XXXXXX)"
if ! meson -Dwarnings-are-errors=true --prefix="$(mktemp -dt ksh.XXXXXX)" \
--buildtype=debug
then
cat meson-logs/meson-log.txt
exit 1
Expand Down
3 changes: 2 additions & 1 deletion scripts/build-on-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ mkdir build
cd build

echo ==== Configuring the build
if ! meson -Dwarnings-are-errors=true --prefix="$(mktemp -dt ksh.XXXXXX)"
if ! meson -Dwarnings-are-errors=true --prefix="$(mktemp -dt ksh.XXXXXX)" \
--buildtype=debug
then
cat meson-logs/meson-log.txt
exit 1
Expand Down

0 comments on commit db54d36

Please sign in to comment.