diff --git a/.github/workflows/ci_meson.yml b/.github/workflows/ci_meson.yml index 37f21a7..80ed836 100644 --- a/.github/workflows/ci_meson.yml +++ b/.github/workflows/ci_meson.yml @@ -6,13 +6,13 @@ on: jobs: linux: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v5 with: python-version: '3.x' - run: pip install meson ninja @@ -26,11 +26,11 @@ jobs: macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v5 with: python-version: '3.x' - run: brew install gcc diff --git a/meson.build b/meson.build index fdc0f51..994efca 100644 --- a/meson.build +++ b/meson.build @@ -34,9 +34,13 @@ flags += ['-Werror', '-Wall', '-Wextra', '-Wpedantic'] link_flags = [] -if (build_type.startswith('debug') and compiler == 'gcc') - flags += ['-fsanitize=address', '-fno-omit-frame-pointer'] - link_flags += ['-Wl,-Bstatic', '-lasan', '-Wl,-Bdynamic'] +if host_machine.system() == 'linux' + if build_type.startswith('debug') + flags += ['-fsanitize=address', '-fno-omit-frame-pointer'] + link_flags += ['-Wl,-Bstatic', '-lasan', '-Wl,-Bdynamic'] + elif build_type.startswith('release') + link_flags += ['-static'] + endif endif executable(