I’m attempting to build OpenMP from source following the instructions here: llvm-project/openmp at main · llvm/llvm-project · GitHub
I use this cmake call to configure & build:
cd llvm/openmp
mkdir build && cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../
cmake --build .
When I do this, I get an error about an unknown target CPU:
...
[ 9%] Building LLVM bitcode Workshare.cpp-gfx1036.bc
error: unknown target CPU 'gfx1036'
note: valid target CPU values are: gfx600, tahiti, gfx601, pitcairn, verde, gfx602, hainan, oland, gfx700, kaveri, gfx701, hawaii, gfx702, gfx703, kabini, mullins, gfx704, bonaire, gfx705, gfx801, carrizo, gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11, gfx805, tongapro, gfx810, stoney, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035
make[2]: *** [libomptarget/DeviceRTL/CMakeFiles/omptarget-amdgpu-gfx1036-bc.dir/build.make:244: libomptarget/DeviceRTL/Workshare.cpp-gfx1036.bc] Error 1
make[1]: *** [CMakeFiles/Makefile2:2110: libomptarget/DeviceRTL/CMakeFiles/omptarget-amdgpu-gfx1036-bc.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I’m using cmake version 3.23.1 and clang version 13.0.1.
Can anyone advise what I might be doing wrong here? Apologies if this is a trivial question.
Thanks,
Adam