Skip to content

Commit

Permalink
[Meson] Build without werror by default
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kowalczyk <mkow@invisiblethingslab.com>
  • Loading branch information
mkow authored and Dmitrii Kuvaiskii committed Feb 17, 2022
1 parent e929b4d commit b5c94d0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .ci/lib/config.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
env.WERROR = '1'
env.MAKEOPTS = '-j8'

python_platlib = sh(returnStdout: true, script: 'python3 Scripts/get-python-platlib.py "$PREFIX"')
Expand Down
1 change: 1 addition & 0 deletions .ci/lib/stage-build-nosgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ stage('build') {
try {
sh '''
meson setup build/ \
--werror \
--prefix="$PREFIX" \
--buildtype="$BUILDTYPE" \
-Dskeleton=enabled \
Expand Down
2 changes: 2 additions & 0 deletions .ci/lib/stage-build-sgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ stage('build') {
try {
sh '''
meson setup build-dcap/ \
--werror \
--prefix="$PREFIX" \
--buildtype="$BUILDTYPE" \
-Ddirect=disabled \
Expand All @@ -49,6 +50,7 @@ stage('build') {
try {
sh '''
meson setup build/ \
--werror \
--prefix="$PREFIX" \
--buildtype="$BUILDTYPE" \
-Ddirect=disabled \
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ also built by Meson, must be installed as well. To do that, configure your build
directory with ``-Dtests=enabled`` and install Gramine::

# add -Dsgx=enabled and SGX options if necessary
meson setup build/ -Dtests=enabled -Ddirect=enabled
meson setup build/ --werror -Dtests=enabled -Ddirect=enabled

ninja -C build/
sudo ninja -C build/ install
Expand Down
5 changes: 5 additions & 0 deletions Documentation/devel/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ means non-SGX version)::
meson setup build/ --buildtype=release -Ddirect=enabled -Dsgx=enabled \
-Dsgx_driver=<driver> -Dsgx_driver_include_path=<path-to-sgx-driver-sources>

.. note::

If you plan to contribute changes to Gramine, then you should always build it
with ``--werror`` added to the invocation above.

.. note::

If you invoked ``meson setup`` once, the next invocation of this command will
Expand Down
4 changes: 2 additions & 2 deletions Documentation/devel/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ debugging process easier.
To build Gramine with debug symbols, the source code needs to be compiled with
``--buildtype=debug``::

meson setup build-debug/ --buildtype=debug -Ddirect=enabled
meson setup build-debug/ --werror --buildtype=debug -Ddirect=enabled
ninja -C build-debug/
sudo ninja -C build-debug/ install

Expand All @@ -37,7 +37,7 @@ execution *outside* the enclave).
To build Gramine with debug symbols, the source code needs to be compiled with
``--buildtype=debug``::

meson setup build-debug/ --buildtype=debug -Dsgx=enabled
meson setup build-debug/ --werror --buildtype=debug -Dsgx=enabled
ninja -C build-debug/
sudo ninja -C build-debug/ install

Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ project(
default_options: [
'c_std=c11',
'cpp_std=c++14',
'werror=true',
],
)

Expand Down

0 comments on commit b5c94d0

Please sign in to comment.