summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/fopenmp.c
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] Use the OpenMP-IR-BuilderJohannes Doerfert2019-12-111-0/+6
| | | | | | | | | | | | | | | This is a follow up patch to use the OpenMP-IR-Builder, as discussed on the mailing list ([1] and later) and at the US Dev Meeting'19. [1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang Differential Revision: https://reviews.llvm.org/D69922
* [Driver] Add -static-openmp driver optionPirama Arumuga Nainar2019-09-091-0/+31
| | | | | | | | | | | | | | | | | | | | | | Summary: For Gnu, FreeBSD and NetBSD, this option forces linking with the static OpenMP host runtime (similar to -static-libgcc and -static-libstdcxx). Android's NDK will start the shared OpenMP runtime in addition to the static libomp. In this scenario, the linker will prefer to use the shared library by default. Add this option to enable linking with the static libomp. Reviewers: Hahnfeld, danalbert, srhines, joerg, jdoerfert Subscribers: guansong, cfe-commits Tags: #clang Fixes https://github.com/android-ndk/ndk/issues/1028 Differential Revision: https://reviews.llvm.org/D67200 llvm-svn: 371437
* Update some tests after r366702Krasimir Georgiev2019-07-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r366702 added a set of new clang-cl -- specific openmp flags together with tests. The way the newly added tests work is problematic: consider for example this asertion: ``` // RUN: %clang_cl --target=x86_64-windows-msvc /openmp -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CC1-OPENMP %s ... // CHECK-CC1-OPENMP: "-fopenmp" ``` It asserts that an `/openmp` flag should expand into `-fopenmp`. This however depends on the default value of Clang's CLANG_DEFAULT_OPENMP_RUNTIME value. Indeed, the code that adds `-fopenmp` to the output only does it if the default runtime is `libomp` or `libiomp5`, not when it is `libgomp`. I've updated the tests to not depend on the default value of this setting by specifying the runtime to use explicitly in each assertion. Reviewers: jdoerfert Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65272 llvm-svn: 367012
* [OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.Alexey Bataev2019-07-221-0/+4
| | | | | | | Mapped /openmp[:experimental] to -fopenmp option and /openmp- option to -fno-openmp llvm-svn: 366702
* [MinGW] Link to correct openmp libraryMartin Storsjo2018-10-231-0/+21
| | | | | | | | Patch by Peiyuan Song! Differential Revision: https://reviews.llvm.org/D53397 llvm-svn: 345003
* [Driver] Unify linking of OpenMP runtime. NFCI.Jonas Hahnfeld2017-04-191-5/+11
| | | | | | | | While at it, extend test for FreeBSD and check for -lrt iff on Linux. Differential Revision: https://reviews.llvm.org/D30087 llvm-svn: 300689
* Support linking against OpenMP runtime on FreeBSD.Dimitry Andric2015-10-181-0/+8
| | | | | | | | | | | | | | | Summary: Similar to rL248426 (which was a followup to rL248379 and rL248424), add the required libraries for OpenMP on the linker command line, and update the test case. Reviewers: emaste, theraven, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13822 llvm-svn: 250657
* Support linking against OpenMP runtime on NetBSD.Joerg Sonnenberger2015-09-231-0/+12
| | | | llvm-svn: 248426
* Push OpenMP linker flags after linker input on Darwin. Don't add anyJoerg Sonnenberger2015-09-231-0/+25
| | | | | | libraries if -nostdlib is specified. Test. llvm-svn: 248424
* [omp] Loosen the driver test enough so that overriding the defaultsChandler Carruth2015-05-281-2/+11
| | | | | | | | | | works well for folks. This isn't terribly clean (sadly) but after chatting with both Eric and Richard, nothing cleaner really emerged. The clean way of doing this is a *lot* of work for extremely little benefit here. llvm-svn: 238500
* [omp] Re-work Clang's handling of -fopenmp and undo r237769.Chandler Carruth2015-05-281-0/+24
This isn't an actual revert of r237769, it just restores the behavior of the Clang driver prior to it while completely re-implementing how that behavior works. This also re-does the work of making the default OpenMP runtime selectable at CMake (or configure) time to work in the way all of our other such hooks do (config.h, configure and cmake hooks, etc.). I've re-implemented how we manage the '-fopenmp' flagset in an important way. Now, the "default" hook just makes '-fopenmp' equivalent to '-fopenmp=<default>' rather than a separate special beast. Also, there is an '-fno-openmp' flag which does the obvious thing. Also, the code is shared between all the places to select a known OpenMP runtime and act on it. Finally, and most significantly, I've taught the driver to inspect the selected runtime when choosing whether to propagate the '-fopenmp' flag to the frontend in the CC1 commandline. Without this, it isn't possible to use Clang with libgomp, even if you were happy with the serial, boring way in which it worked previously (ignoring all #pragmas but linking in the library to satisfy direct calls into the runtime). While I'm here, I've gone ahead and sketched out a path for the future name of LLVM's OpenMP runtime (libomp) and the legacy support for its current name (libiomp5) in what seems a more reasonable way. To re-enable LLVM's OpenMP runtime (which I think should wait until the normal getting started instructions are a reasonable way for falks to check out, build, and install Clang with the runtime) all that needs to change is the default string in the CMakeLists.txt and configure.ac file. No code changes necessary. I also added a test for the driver's behavior around OpenMP since it was *completely missing* previously. Makes it unsurprising that we got it wrong. llvm-svn: 238389
OpenPOWER on IntegriCloud