-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Use builtin sanitizer option in Meson
- Loading branch information
Showing
3 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
## Copyright (C) 2024 by LH_Mouse <[email protected]> | ||
## | ||
## Permission to use, copy, modify, and/or distribute this | ||
## software for any purpose with or without fee is hereby granted. | ||
## | ||
## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||
## WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||
## WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL | ||
## THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | ||
## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
## LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | ||
## NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | ||
## CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
option('enable-debug-checks', | ||
type: 'boolean', value: false, | ||
description: 'enable run-time assertions') | ||
|
||
option('enable-sanitizer', | ||
type: 'combo', choices: [ 'none', 'address', 'thread' ], | ||
description: 'enable sanitizer library') | ||
|
||
option('enable-repl', | ||
type: 'boolean', value: true, | ||
description: 'enable interactive interpretor') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/bash -e | ||
|
||
meson setup -Dbuildtype=debug -Denable-debug-checks=true build_debug | ||
meson setup -Dbuildtype=release build_release | ||
meson setup \ | ||
-Dbuildtype=debug \ | ||
-Denable-debug-checks=true \ | ||
-Db_sanitize=address,undefined \ | ||
build_debug | ||
|
||
meson setup \ | ||
-Dbuildtype=release \ | ||
build_release |