File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,16 @@ <h3 id="buildNix">On Unix-like Systems</h3>
8686 </ ul >
8787 </ li >
8888
89- < li > If you intend to use Clang's C++ support, you may need to tell it how
90- to find your C++ standard library headers. In general, Clang will detect
91- the best version of libstdc++ headers available and use them - it will
92- look both for system installations of libstdc++ as well as installations
93- adjacent to Clang itself. If your configuration fits neither of these
94- scenarios, you can use the < tt > -DGCC_INSTALL_PREFIX</ tt > cmake option
95- to tell Clang where the gcc containing the desired libstdc++ is installed.
89+ < li > On Linux, you may need GCC runtime libraries (e.g. < tt > crtbeginS.o,
90+ libstdc++.so</ tt > ) and libstdc++ headers. In general, Clang will detect
91+ well-known GCC installation paths matching the target triple (configured at
92+ build time (see < tt > clang --version</ tt > ); overriden by
93+ < tt > --target=</ tt > ) and use the largest version. If your configuration fits
94+ none of the standard scenarios, you can set < tt > --gcc-install-dir=</ tt > to
95+ the GCC installation directory (something like
96+ < tt > /usr/lib/gcc/$triple/$major</ tt > ). If your GCC installation is under
97+ < tt > /usr/lib/gcc</ tt > but uses a different triple, you can set
98+ < tt > --gcc-triple=$triple</ tt > .
9699 </ li >
97100 < li > Try it out (assuming you add llvm/build/bin to your path):
98101 < ul >
Original file line number Diff line number Diff line change @@ -279,11 +279,12 @@ Q: How to build an OpenMP offload capable compiler with an outdated host compile
279279
280280Enabling the OpenMP runtime will perform a two-stage build for you.
281281If your host compiler is different from your system-wide compiler, you may need
282- to set the CMake variable `GCC_INSTALL_PREFIX ` so clang will be able to find the
283- correct GCC toolchain in the second stage of the build.
282+ to set ``CMAKE_{C,CXX}_FLAGS `` like
283+ ``--gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/12 `` so that clang will be
284+ able to find the correct GCC toolchain in the second stage of the build.
284285
285286For example, if your system-wide GCC installation is too old to build LLVM and
286- you would like to use a newer GCC, set the CMake variable ` GCC_INSTALL_PREFIX `
287+ you would like to use a newer GCC, set `` --gcc-install-dir= ` `
287288to inform clang of the GCC installation you would like to use in the second stage.
288289
289290Q: How can I include OpenMP offloading support in my CMake project?
You can’t perform that action at this time.
0 commit comments