4

xcode 6 is based on clang 3.5; on osx 10.9.5 running clang++ --version from the command line reports

 Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)

so I supposed that Apple included openmp support given the fact that in the clang 3.5 release notes

http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html

the clang developers claim partial openmp support. But it seems that the "-fopenmp" argument is still not recognized.

Any hints?

ALoopingIcon
  • 2,218
  • 1
  • 21
  • 30
  • What makes you believe it should be recognized? There is no mention of such a flag in the very page you linked. – Vladimir F Героям слава Oct 04 '14 at 18:38
  • 1
    Indeed. I was asking exactly that: why the flag is not recognised given the fact that it is based on llvm3.5? Apparently they have disabled it. If you recompile the 3.5 llvm/clang toolchain you get (partial) openmp support, but no hints of why it is not in the apple distributed version. – ALoopingIcon Oct 15 '14 at 20:32

1 Answers1

3

Clang still does not fully support OpenMP, actually it supports only Parsing/Sema analysis + some basic coidegen for 'omp parallel' and 'omp simd' directives. You can try to activate it by adding -Xclang -fopenmp=libiomp5 options.

Alexey Bataev
  • 428
  • 3
  • 11
  • 1
    Adding `-Xclang -fopenmp=libiomp5` produces an `error: unknown argument: '-fopenmp=libiomp5'` and `-Xclang -fopenmp` produces `fatal error: 'omp.h' file not found`. What are the correct flags? – Alec Jacobson Feb 10 '15 at 17:53
  • 5
    It seems Apple's clang does not support OpenMP at all. You have to use trunk version or clang from clang-omp.github.com – Alexey Bataev Feb 18 '15 at 03:15