From 5de507294003526684483086edfbba0843009286 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 30 Jan 2025 16:55:26 +0100 Subject: [PATCH] Improve flang-new identification and add CI job for it on OSX-x86_64 (#5103) * AzureCI: Add LLVM/flang-new build on OSX-x86_64 * distinguish classic flang from flang-new in name based recognition --- azure-pipelines.yml | 14 +++++++++++++- f_check | 7 +++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0bdf4e316..26f4c2af3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -164,7 +164,19 @@ jobs: - script: | brew update make CC=gcc-12 FC=gfortran-12 - + +- job: OSX_LLVM_flangnew + pool: + vmImage: 'macOS-latest' + variables: + LD_LIBRARY_PATH: /usr/local/opt/llvm/lib + LIBRARY_PATH: /usr/local/opt/llvm/lib + steps: + - script: | + brew update + brew install llvm flang + make TARGET=NEHALEM CC=/usr/local/opt/llvm/bin/clang FC=/usr/local/Cellar/flang/19.1.7_1/bin/flang-new NO_SHARED=1 + - job: OSX_OpenMP_Clang pool: vmImage: 'macOS-latest' diff --git a/f_check b/f_check index 93c5962de..244f6bcae 100755 --- a/f_check +++ b/f_check @@ -245,6 +245,13 @@ else ;; *flang*) vendor=FLANG + data=`$compiler -v 2>&1 > /dev/null` + v="${data#*version *}" + v="${v%%*.}" + major="${v%%.*}" + if [ "$major" -ge 17 ]; then + vendor=FLANGNEW + fi bu=_ openmp='-fopenmp' ;;