This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix layering problem with FrontendOpenMP
ClosedPublic

Authored by jdoerfert on Apr 6 2020, 11:01 AM.

Details

Summary

ASTMatchers is used in various places and it now exposes the
LLVMFrontendOpenMP library to its users without them needing to depend
on it explicitly.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 6 2020, 11:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 11:01 AM
This revision is now accepted and ready to land.Apr 6 2020, 11:02 AM
This revision was automatically updated to reflect the committed changes.
martong removed a subscriber: martong.Apr 7 2020, 2:00 AM
aheejin added a subscriber: aheejin.Apr 7 2020, 9:09 AM

Could you revert this patch? This is causing an error like this whenever I run clang binary:

: CommandLine Error: Option 'openmp-ir-builder-optimistic-attributes' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

This happens when clang is built with -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_LLVM_DYLIB=ON.

Could you revert this patch? This is causing an error like this whenever I run clang binary:

: CommandLine Error: Option 'openmp-ir-builder-optimistic-attributes' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

This happens when clang is built with -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_LLVM_DYLIB=ON.

I'll revert it. Is there a buildbot with this configuration? Do you happen to have insights on how to resolve the issue?

Thanks. Not sure if there's a buildbot that uses -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_LLVM_DYLIB=ON, but I think you can build with it yourself to reproduce it. About how to resolve the issue, I have no idea, sorry.

tstellar added inline comments.
clang/lib/ASTMatchers/CMakeLists.txt
17–18

My guess is that this is the problem. Making this change will cause clang binaries to link against the LLVMFrontendOpenMP static library in addition to libLLVM.so (which already contains this library).

Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: sstefan1. · View Herald Transcript