Skip to content

Commit 0d4597a

Browse files
WillAyddongjoon-hyun
authored andcommitted
ORC-1937: Use the default buildtype in Meson config
### What changes were proposed in this pull request? This removes setting the Meson configuration to remove the buildtype of release by default. ### Why are the changes needed? While coming from CMake it may seem like a good idea to build release builds by default, the setting is either ignored or problematic when orc is used as a subproject in other projects, especially on Windows where a main project building a library with debug symbols may fail if a subproject tries to force release symbols. ### How was this patch tested? Compiled locally ### Was this patch authored or co-authored using generative AI tooling? No Closes #2298 from WillAyd/remove-meson-release-build. Authored-by: Will Ayd <william.ayd@icloud.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 15d86df commit 0d4597a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,6 @@ jobs:
252252
pip install meson
253253
- name: Test
254254
run: |
255-
meson setup build
255+
meson setup build -Dbuildtype=release
256256
meson compile -C build
257257
meson test -C build

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ meson compile -C build
126126
meson test -C build
127127
```
128128

129-
By default, Meson will build release libraries. If you would instead like debug libraries, you can use the ``-Dbuildtype=debug`` argument to setup. You must either remove the existing build directory before changing that setting, or alternatively pass the ``--reconfigure`` flag:
129+
By default, Meson will build unoptimized libraries with debug symbols. By contrast, the CMake build system generates release libraries by default. If you would like to create release libraries ala CMake, you should set the buildtype option. You must either remove the existing build directory before changing that setting, or alternatively pass the ``--reconfigure`` flag:
130130

131131
```shell
132-
meson setup build -Dbuildtype=debug --reconfigure
132+
meson setup build -Dbuildtype=release --reconfigure
133133
meson compile -C build
134134
meson test -C build
135135
```

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ project(
2222
license: 'Apache-2.0',
2323
meson_version: '>=1.3.0',
2424
default_options: [
25-
'buildtype=release',
2625
'warning_level=2',
2726
'cpp_std=c++17',
2827
],

0 commit comments

Comments
 (0)