Lines Matching +full:openmp +full:- +full:build

2 How to Build the LLVM* OpenMP* Libraries
5 and Clang need a more recent version which also applies for in-tree builds. For
15 - When calling CMake for the first time, all needed compiler options must be
19 in the build options section below.
20 - Example of configuring, building, reconfiguring, rebuilding:
22 .. code-block:: console
24 $ mkdir build
25 $ cd build
26 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. # Initial configuration
30 $ cmake -DCMAKE_BUILD_TYPE=Debug .. # Second configuration
33 $ rm -rf *
34 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. # Third configuration
37 - Notice in the example how the compiler definitions are only specified for an
38 empty build directory, but other build options are used at any time.
39 - The file ``CMakeCache.txt`` which is created after the first call to CMake is
40 a configuration file which holds all values for the build options. These
43 - To have CMake create a particular type of build generator file simply include
44 the ``-G <Generator name>`` option:
46 .. code-block:: console
48 $ cmake -G "Unix Makefiles" ...
53 Instructions to Build
55 .. code-block:: console
58 $ mkdir build
59 $ cd build
62 $ cmake -DCMAKE_C_COMPILER=<C Compiler> -DCMAKE_CXX_COMPILER=<C++ Compiler> ..
65 …$ cmake -G <Generator Type> -DCMAKE_C_COMPILER=<C Compiler> -DCMAKE_CXX_COMPILER=<C++ Compiler> -D…
75 .. code-block:: console
77 $ cmake -DOPTION=<value> path/to/source
82 ---------------
84 ``cmake --help-variable VARIABLE_NAME`` to get information about a specific
88 Build type can be ``Release``, ``Debug``, or ``RelWithDebInfo`` which chooses
100 compiler is not needed during the build.
106 -------------------------
124 building. Will default to flang if build is in-tree.
129 **OPENMP_LLVM_LIT_EXECUTABLE** = ``/path/to/llvm-lit``
130 Specify full path to ``llvm-lit`` executable for running tests. The default
142 ----------------------
150 build for. This value is ignored if **LIBOMP_ARCH** does not equal ``mic``.
162 Build a shared library. If this option is ``OFF``, static OpenMP libraries
174 On macOS* machines, it is possible to build universal (or fat) libraries which
177 .. code-block:: console
179 …$ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_OSX_ARCHITECTURES='i386;x86_…
183 this is an LLVM source tree build. It will only apply for the ``libomp`` library
184 avoids having the entire LLVM/Clang build produce universal binaries.
192 by default for IA-32 architecture and Intel(R) 64 architecture.
195 Align certain data structures on 4096-byte. This option is useful on
196 multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing.
199 Include support for the OpenMP Tools Interface (OMPT).
209 Include stats-gathering code.
215 Use `OpenMPI's hwloc library <https://www.open-mpi.org/projects/hwloc/>`_ for
229 **LIBOMP_CPPFLAGS** = <space-separated flags>
232 **LIBOMP_CXXFLAGS** = <space-separated flags>
235 **LIBOMP_ASMFLAGS** = <space-separated flags>
238 **LIBOMP_LDFLAGS** = <space-separated flags>
241 **LIBOMP_LIBFLAGS** = <space-separated flags>
244 **LIBOMP_FFLAGS** = <space-separated flags>
248 ----------------------------
253 - As a project of a regular LLVM build via **LLVM_ENABLE_PROJECTS**,
255 - as a standalone project build that uses a pre-installed LLVM package.
257 … call `succeeds <https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure>`_.
261 out-of-tree builds.
268 --------------------------------
273 by default if the build system determines that `CMAKE_C_COMPILER` is able to
279 bitcode offloading device RTL. If unspecified, either the Clang from the build
280 itself is used (i.e. an in-tree build with LLVM_ENABLE_PROJECTS including
281 clang), or the Clang compiler that the build uses as C compiler
283 stage2-build or when using -DLLVM_ENABLE_RUNTIMES=openmp.
288 unspecified, either the llvm-link in that same directory as
289 LIBOMPTARGET_NVPTX_CUDA_COMPILER is used, or the llvm-link from the
290 same build (available in an in-tree build).
308 Arguments given to lit. ``make check-libomptarget`` and
309 ``make check-libomptarget-*`` are affected. For example, use
310 ``LIBOMPTARGET_LIT_ARGS="-j4"`` to force ``lit`` to start only four parallel
317 -------------------
319 .. code-block:: console
321 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
322 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
323 $ cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc ..
326 ------------------------------------
328 - Build the i386 Linux* library using GCC*
330 .. code-block:: console
332 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_ARCH=i386 ..
334 - Build the x86_64 debug Mac library using Clang*
336 .. code-block:: console
338 …$ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBOMP_ARCH=x86_64 -DCMAKE_BUILD_T…
340 - Build the library (architecture determined by probing compiler) using the
344 .. code-block:: console
346 …$ cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort -DLIBOMP_F…
348 - Have CMake find the C/C++ compiler and specify additional flags for the
351 .. code-blocks:: console
353 …$ cmake -DLIBOMP_CPPFLAGS='-DNEW_FEATURE=1 -DOLD_FEATURE=0' -DLIBOMP_CXXFLAGS='--one-specific-flag…
355 - Build the stubs library
357 .. code-blocks:: console
359 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_LIB_TYPE=stubs ..
368 There are following check-* make targets for tests.
370 - ``check-ompt`` (ompt tests under runtime/test/ompt)
371 - ``check-ompt-multiplex`` (ompt multiplex tests under tools/multiplex/tests)
372 - ``check-libarcher`` (libarcher tests under tools/archer/tests)
373 - ``check-libomp`` (libomp tests under runtime/test. This includes check-ompt tests too)
374 - ``check-libomptarget-*`` (libomptarget tests for specific target under libomptarget/test)
375 - ``check-libomptarget`` (all check-libomptarget-* tests)
376 - ``check-openmp`` (combination of all above tests excluding duplicates)
378 For example, to run all available tests, use ``make check-openmp``.
381 ------------------
386 Default environment variables which test process uses for ``check-openmp``
387 separated by space. This can be used for individual targets (``check-ompt``,
388 ``check-ompt-multiplex``, ``check-libarcher``, ``check-libomp`` and
389 ``check-libomptarget-*``) too. Note that each test still overrides
393 .. code-block:: console
395 …r KMP_FORKJOIN_BARRIER_PATTERN=hier,hier KMP_REDUCTION_BARRIER_PATTERN=hier,hier" make check-openmp