Skip to content

Commit 5de5072

Browse files
authored
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
1 parent 1f74fb9 commit 5de5072

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

azure-pipelines.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,19 @@ jobs:
164164
- script: |
165165
brew update
166166
make CC=gcc-12 FC=gfortran-12
167-
167+
168+
- job: OSX_LLVM_flangnew
169+
pool:
170+
vmImage: 'macOS-latest'
171+
variables:
172+
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
173+
LIBRARY_PATH: /usr/local/opt/llvm/lib
174+
steps:
175+
- script: |
176+
brew update
177+
brew install llvm flang
178+
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
179+
168180
- job: OSX_OpenMP_Clang
169181
pool:
170182
vmImage: 'macOS-latest'

f_check

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ else
245245
;;
246246
*flang*)
247247
vendor=FLANG
248+
data=`$compiler -v 2>&1 > /dev/null`
249+
v="${data#*version *}"
250+
v="${v%%*.}"
251+
major="${v%%.*}"
252+
if [ "$major" -ge 17 ]; then
253+
vendor=FLANGNEW
254+
fi
248255
bu=_
249256
openmp='-fopenmp'
250257
;;

0 commit comments

Comments
 (0)