Page MenuHomePhabricator

[OPENMP] Allow to disable OpenMP support and link libgomp
AbandonedPublic

Authored by ABataev on May 20 2015, 3:19 AM.

Details

Reviewers
chandlerc
Summary

Added flag ENABLE_CLANG_OPENMP that is ON by default. If set to OFF, changes behavior of -fopenmp option to the old one.

Diff Detail

Event Timeline

ABataev updated this revision to Diff 26135.May 20 2015, 3:19 AM
ABataev retitled this revision from to [OPENMP] Allow to disable OpenMP support and link libgomp.
ABataev updated this object.
ABataev edited the test plan for this revision. (Show Details)
ABataev added a reviewer: chandlerc.
ABataev added a subscriber: Unknown Object (MLST).
emaste added a subscriber: emaste.May 20 2015, 4:30 AM

I'm curious - what is the use case for the old behaviour?

AFAICT if the user sets Enable OpenMP support OFF they'll get a compiler that links against libgomp when -fopenmp is specified, but doesn't produce a useful openmp executable?

test/OpenMP/linking_no_openmp.c
2

-fopenmp=libgomp?

I'm curious - what is the use case for the old behaviour?

Ah, I found Chandler's explanation for this, in the thread for r237769.

I am not having any luck with this proposed patch. Building current llvm/clang/openmp/compiler-rt trunk with it produces a compiler that always defaults to emitting -lgomp for -fopenmp even if cmake is explicitly passed -DENABLE_CLANG_OPENMP=ON.

ABataev abandoned this revision.May 20 2015, 8:02 PM

Already has been fixed by Richard Smith.

chandlerc edited edge metadata.May 20 2015, 8:12 PM

Yea, i think Daniel's patch was a closer start. Anyways, thanks for taking
a stab at this.