This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Make default OpenMP library (the one selected with just -fopenmp) configurable in the CMake build. There shouldn't be any change in default behavior.
ClosedPublic

Authored by djasper on May 20 2015, 6:40 AM.

Details

Diff Detail

Event Timeline

djasper updated this revision to Diff 26148.May 20 2015, 6:40 AM
djasper retitled this revision from to [OpenMP] Make default OpenMP library (the one selected with just -fopenmp) configurable in the CMake build. There shouldn't be any change in default behavior..
djasper updated this object.
djasper edited the test plan for this revision. (Show Details)
djasper added reviewers: chandlerc, rsmith, ABataev.
djasper added a subscriber: Unknown Object (MLST).
klimek added a subscriber: klimek.May 20 2015, 10:31 AM
klimek added inline comments.
CMakeLists.txt
447–448

Add comment explaining the space in the end.

djasper added inline comments.May 20 2015, 10:38 AM
CMakeLists.txt
447–448

Removed. I don't think it is necessary.

rsmith added inline comments.May 20 2015, 1:12 PM
lib/Driver/Tools.cpp
6294–6309

It seems bad to silently not link against any OpenMP library if the value for OPENMP_DEFAULT_LIB is unknown. Maybe either OPENMP_DEFAULT_LIB should be a lib name that we blindly add to the link line ("-l" #OPENMP_DEFAULT_LIB), or we should check the value is valid in CMakeLists.txt.

6295

Hm, are you expecting the -D value to already include the double-quotes? If not, this looks wrong. And if so, you should not be adding a trailing space in CMakeLists.txt.

rsmith accepted this revision.May 20 2015, 3:53 PM
rsmith edited edge metadata.

I switched to specifying a library name in OPENMP_DEFAULT_LIB (to support cases where people ship libiomp5 under a different name) and commited as r237850.

This revision is now accepted and ready to land.May 20 2015, 3:53 PM
rsmith closed this revision.May 20 2015, 3:53 PM