[llvm-bugs] [Bug 26318] New: Option -module-dependency-dir reported by -help, but not supported by clang driver

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 26 07:29:44 PST 2016


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

            Bug ID: 26318
           Summary: Option -module-dependency-dir reported by -help, but
                    not supported by clang driver
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeremy.bennett at embecosm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15720
  --> https://llvm.org/bugs/attachment.cgi?id=15720&action=edit
Example program from source tree attached for convenience

clang --help reports -module-dependency-dir as one of its options:

  -module-dependency-dir <value>
                          Directory to dump module dependencies to

However the option is not supported by the clang driver. Taking the clang
test/Modules/dependency-dump.m (attached for convenience), we run:

  $ clang -fmodules -module-dependency-dir `pwd` dependency-dump.m 
  clang-3.9: warning: argument unused during compilation:
'-module-dependency-dir /tmp'

However, if CC1 is invoked explicitly, the option is accepted:

  $ clang -cc1 -fmodules -module-dependency-dir `pwd` dependency-dump.m 
  dependency-dump.m:15:9: fatal error: module 'Module' not found
  @import Module;
  ...

The option should either be removed from the list reported by clang --help, or
be promoted to be accepted by the top level clang driver (which would seem more
consistent).

This is a similar issue to that reported in Bug 26317.

Issue identified with commit 7506929a38783ed7038f893c8f1f59f6a4ccfd20,
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258290
91177308-0d34-0410-b5e6-96231b3b80d8

-- 
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/20160126/5107d941/attachment-0001.html>


More information about the llvm-bugs mailing list