r238389 - [omp] Re-work Clang's handling of -fopenmp and undo r237769.

İsmail Dönmez ismail at donmez.ws
Fri May 29 05:56:48 PDT 2015


On Thu, May 28, 2015 at 11:48 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> On Thu, May 28, 2015 at 5:09 AM İsmail Dönmez <ismail at donmez.ws> wrote:
>>
>> Hi,
>>
>> On Thu, May 28, 2015 at 4:52 AM, Chandler Carruth <chandlerc at gmail.com>
>> wrote:
>> > Author: chandlerc
>> > Date: Wed May 27 20:52:38 2015
>> > New Revision: 238389
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=238389&view=rev
>> > Log:
>> > [omp] Re-work Clang's handling of -fopenmp and undo r237769.
>>
>>
>> This seems to break openmp tests with
>> -DCLANG_DEFAULT_OPENMP_RUNTIME=libiomp5 see:
>
>
> Yea, I wanted to have test coverage of the default, but it doesn't work well
> when the default is overridden.
>
> I looked into how to actually have test coverage of the default and track
> which default was selected, but its really hard and complex. Yuck.
>
> I'll look for a way to get at least *some* coverage of the default without
> making it break folks that are overriding it. Sorry for the trouble.

Tests pass now but there is still one grave problem. With
CLANG_DEFAULT_OPENMP_RUNTIME=libiomp5 if you do:

λ clang -fopenmp=libgomp omp_hello.c
λ ./a.out
Hello World from thread = 0
Number of threads = 1

No OpenMP, lets go back to defaults:

λ clang -fopenmp=libiomp5 omp_hello.c
λ ./a.out
Hello World from thread = 0
Hello World from thread = 4
Hello World from thread = 3
Hello World from thread = 2
Hello World from thread = 6
Hello World from thread = 1
Hello World from thread = 5
Hello World from thread = 7
Number of threads = 8




More information about the cfe-commits mailing list