Skip to content

Commit aa76b29

Browse files
committed
drop standalone OpenMP dep; let qblas_dep propagate it
quaddtype's own sources don't use OpenMP (no #pragma omp or omp_* calls). Both quaddtype's meson.build and qblas's meson.build called dependency('openmp'), and qblas_dep also propagated the OpenMP dep through its 'dependencies:' list. The same OpenMP instance therefore appeared twice in quaddtype's compile-args closure. On Apple's clang++ that double inclusion left an orphan -Xpreprocessor in the args stream. Meson's ninja rule appends dependency-generation flags ('-MD -MQ -MF ...') after $ARGS, so the orphan -Xpreprocessor paired with -MD on the next line. clang++ then passed -MD to the preprocessor verbatim, the preprocessor rejected it as unknown, and every C++ compile failed - sinking the macos-15 wheel build. qblas_dep already brings OpenMP transitively when QBLAS is enabled. When QBLAS is disabled (Windows / -Ddisable_quadblas=true) we don't need OpenMP at all because none of quaddtype's own sources use it. Removing the second dependency('openmp') makes the closure single- sourced and eliminates the duplicate compile args.
1 parent e14c254 commit aa76b29

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

meson.build

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,14 @@ npymath_lib = c.find_library('npymath', dirs: npymath_path)
119119

120120
dependencies = [py_dep, qblas_dep, sleef_dep, sleefquad_dep, npymath_lib]
121121

122-
# Add OpenMP dependency (optional, for threading)
123-
openmp_dep = dependency('openmp', required: false, static: false)
124-
if openmp_dep.found()
125-
dependencies += openmp_dep
126-
endif
122+
# OpenMP is not used directly by any source in this package (#pragma omp
123+
# is absent); it only matters because qblas's static lib has OpenMP
124+
# objects baked in. qblas_dep already propagates the OpenMP requirement
125+
# transitively, so adding a second dependency('openmp') here would put
126+
# OpenMP into the compile-args closure twice. On Apple's clang++ that
127+
# duplication leaves an orphan '-Xpreprocessor' in $ARGS which then
128+
# pairs with '-MD' from the dep-gen flags ('-Xpreprocessor -MD'), and
129+
# the preprocessor rejects -MD as unknown - failing all C++ compiles.
127130

128131
# compiler flags for QBLAS compatibility
129132
if not is_windows

0 commit comments

Comments
 (0)