errors · 3.3nextpnr-xilinx, while compiling on macOS
clang++: error: unsupported option '-fopenmp'
You ran ninja (or make) to build nextpnr-xilinx on a Mac and the first file died with this line.
Why does it happen?
nextpnr's build turns OpenMP on by default. Apple's compiler ships without OpenMP support, so the flag -fopenmp is rejected. Homebrew's libomp does not change that on its own.
What is the fix?
Configure with -DUSE_OPENMP=OFF. This is the full command used in the guide, from inside the cloned folder.
cmake -B build -G Ninja \
-DARCH=xilinx \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_OPENMP=OFF \
-DBUILD_GUI=OFF -DBUILD_PYTHON=OFF -DBUILD_TESTS=OFF
ninja -C build -j3
OpenMP only parallelizes part of the placer; the blink build in the guide takes 4.6 s without it. -j3 keeps an 8 GB Mac from swapping; with 16 GB or more you can raise it.
What should you see?
~/fpga/nextpnr-xilinx/build/nextpnr-xilinx --version
# "nextpnr-xilinx" -- Next Generation Place and Route (Version 0.9.6)
Section 3.3 of the guide walks through the whole build: nextpnr-xilinx.