<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang needs to accept -fmodule-map-file multiple times"
   href="http://llvm.org/bugs/show_bug.cgi?id=21214">21214</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang needs to accept -fmodule-map-file multiple times
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>steveire@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently only the last instance on the command line is consumed:

$ cat test.cpp 

#include "foo.h"
#include "bar.h"

int main(int, char **) {

  return 0;
}

$ ls include/
bar.h  bar.map  foo.h  foo.map

$ cat include/*
#pragma once

static inline int bar() { return 1; }
module bar {
  requires cplusplus
  header "bar.h"
}
#pragma once

static inline int foo() { return 1; }
module foo {
  requires cplusplus
  header "foo.h"
}

$ clang++ -E -fmodules -fmodule-map-file=include/foo.map -I include test.cpp 
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2

@import foo; /* clang -E: implicit import for ".../include/foo.h" */
# 1 "include/bar.h" 1


static inline int bar() { return 1; }
# 4 "test.cpp" 2

int main(int, char **) {

  return 0;
}

$ clang++ -E -fmodules -fmodule-map-file=include/foo.map
-fmodule-map-file=include/bar.map -I include test.cpp 
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2

# 1 "include/foo.h" 1


static inline int foo() { return 1; }
# 3 "test.cpp" 2
@import bar; /* clang -E: implicit import for ".../include/bar.h" */

int main(int, char **) {

  return 0;
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>