diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index c6f3dc416687..8dfedd3c67ba 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -55,6 +55,7 @@ jobs: with: platform: ${{ matrix.ARCH }} packages: | + clang cmake gcc-fortran gcc-objc++ diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index fe28a67edbad..cf92f2bc6e80 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -74,6 +74,7 @@ jobs: lcov wget unzip + mingw-w64-${{ matrix.MSYS2_ARCH }}-clang mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2 mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2 diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index aed03391889d..53d40def42d7 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -46,9 +46,8 @@ # There is currently no pgc++ for Windows, only for Mac and Linux. defaults['cpp'] = ['icl', 'cl', 'c++', 'g++', 'clang++', 'clang-cl'] defaults['fortran'] = ['ifort', 'gfortran', 'flang', 'pgfortran', 'g95'] - # Clang and clang++ are valid, but currently unsupported. - defaults['objc'] = ['cc', 'gcc'] - defaults['objcpp'] = ['c++', 'g++'] + defaults['objc'] = ['clang-cl', 'gcc'] + defaults['objcpp'] = ['clang-cl', 'g++'] defaults['cs'] = ['csc', 'mcs'] else: if platform.machine().lower() == 'e2k': @@ -59,8 +58,8 @@ else: defaults['c'] = ['cc', 'gcc', 'clang', 'nvc', 'pgcc', 'icc', 'icx'] defaults['cpp'] = ['c++', 'g++', 'clang++', 'nvc++', 'pgc++', 'icpc', 'icpx'] - defaults['objc'] = ['cc', 'gcc', 'clang'] - defaults['objcpp'] = ['c++', 'g++', 'clang++'] + defaults['objc'] = ['clang', 'gcc'] + defaults['objcpp'] = ['clang++', 'g++'] defaults['fortran'] = ['gfortran', 'flang', 'nvfortran', 'pgfortran', 'ifort', 'ifx', 'g95'] defaults['cs'] = ['mcs', 'csc'] defaults['d'] = ['ldc2', 'ldc', 'gdc', 'dmd'] diff --git a/test cases/cmake/24 mixing languages/test.json b/test cases/cmake/24 mixing languages/test.json new file mode 100644 index 000000000000..501fcfe8c113 --- /dev/null +++ b/test cases/cmake/24 mixing languages/test.json @@ -0,0 +1,5 @@ +{ + "env": { + "CC": "clang" + } +}