[llvm-bugs] [Bug 31905] New: [modules] #include "stddef.h" breaks module map search paths; causes redefinitions.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 8 13:46:33 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31905

            Bug ID: 31905
           Summary: [modules] #include "stddef.h" breaks module map search
                    paths; causes redefinitions.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eric at efcs.ca
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17951
  --> https://llvm.org/bugs/attachment.cgi?id=17951&action=edit
full reproducer.

Currently including "stddef.h" or other builtin headers when modules is enabled
causes Clang to find `module.modulemap` files along the wrong search paths. For
example, given the following configuration:

1) A project "my_project" which provides a module map for its headers.

2) The system has an installation of "my_project" in
"/usr/local/include/my_project".

3) A user has a local development copy of "my_project" that they are trying to
compile.

While compiling the local copy both the in-tree and system installed
module.modulemap are along the header include paths, however the local copy has
precedence and that's the module.modulemap Clang initially selects.

However after Clang processes a `#include "stddef.h"` it will end up processing
`/usr/local/include/my_project/module.modulemap`. This causes module
re-definition compile errors.

This bug is currently preventing LLVM from installing it's module maps, because
this bug will be hit when re-compiling LLVM.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170208/b2dc95dd/attachment.html>


More information about the llvm-bugs mailing list