[Openmp-dev] OpenMP runtime on OSX

Simone Atzeni via Openmp-dev openmp-dev at lists.llvm.org
Mon Mar 27 16:02:30 PDT 2017


Hi,

I am working on a tool called Arched for data race detection on OpenMP applications.
Archer is based on Clang/LLVM and it works correctly on Linux.
I would like to port the tool on OSX but I am having some issues with the OpenMP runtime.

As far as I know Apple Clang does not support OpenMP, so I brew LLVM 4.0 and compiled the OpenMP runtime from the github llvm-mirror and it’s working correctly.
However, when I run “ninja check-libomp”, I get this compiler error (for each test):

------------------------------------------------------------------------------------
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libm.tbd' for architecture x86_64
------------------------------------------------------------------------------------

The compilation command is:

------------------------------------------------------------------------------------
clang -fopenmp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk test.c -o test
------------------------------------------------------------------------------------

If I remove the flag “-isysroot ….” it works.

So my question is, why the test “lit.cfg” add the “-isysroot …” flag?
To make it work without removing the flag do I have to compile Clang/LLVM and explicitly specify as toolchain Xcode?

Thanks!
Best,
Simone



More information about the Openmp-dev mailing list