Skip to content

Commit

Permalink
Merge pull request #75 from lazka/clang32-disable-openmp
Browse files Browse the repository at this point in the history
clang32: openmp is gone
  • Loading branch information
lazka authored Nov 21, 2024
2 parents 8a3c38c + 3a66132 commit 662c04f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
${{ matrix.prefix }}-cmake
${{ matrix.prefix }}-make
${{ matrix.prefix }}-${{ !contains(matrix.prefix, 'i686') && matrix.cc == 'gcc' && 'gcc-ada' || 'ninja'}}
${{ matrix.prefix }}-${{ matrix.cc != 'gcc' && 'openmp' || 'ninja'}}
${{ matrix.prefix }}-${{ !contains(matrix.prefix, 'i686') && matrix.cc != 'gcc' && 'openmp' || 'ninja'}}
${{ matrix.prefix }}-${{ matrix.cc != 'gcc' && 'lld' || 'ninja'}}
${{ matrix.prefix }}-${{ matrix.cc != 'gcc' && 'libc++' || 'ninja'}}
${{ matrix.prefix }}-${{ matrix.fc == 'gfortran' && 'gcc-fortran' || 'ninja'}}
Expand Down
4 changes: 4 additions & 0 deletions toolchain/meson/meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
option('openmp',
type: 'boolean',
value: true,
description: 'Enable OpenMP support')
10 changes: 6 additions & 4 deletions toolchain/meson/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ test('pch', executable('pch', 'pch.cpp', cpp_pch : 'pch/pch.hpp'))
test('libcpp_long_double', executable('libcpp_long_double', 'libcpp_long_double.cpp'))


openmp = dependency('openmp')
env = environment()
env.set('OMP_NUM_THREADS', '1')
test('openmp_for_if', executable('openmp_for_if', 'openmp_for_if.c', dependencies : [openmp]), env : env)
openmp = dependency('openmp', required: get_option('openmp'))
if openmp.found()
env = environment()
env.set('OMP_NUM_THREADS', '1')
test('openmp_for_if', executable('openmp_for_if', 'openmp_for_if.c', dependencies : [openmp]), env : env)
endif
test('pow', executable('pow', 'pow.c', c_args: ['-fno-builtin', '-fno-strict-aliasing']))

windres_res = import('windows').compile_resources('windres.rc')
Expand Down
7 changes: 6 additions & 1 deletion toolchain/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

set -e

options=()
if [[ "$MSYSTEM" == "CLANG32" ]]; then
options+=("-Dopenmp=false")
fi

cd meson
meson setup _build --werror
meson setup "${options[@]}" _build --werror
meson compile -C _build
meson test -C _build
cd ..
Expand Down

0 comments on commit 662c04f

Please sign in to comment.