<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 11, 2014 at 6:06 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
On 12/06/2014 03:32, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: rsmith<br>
Date: Wed Jun 11 19:32:32 2014<br>
New Revision: 210726<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=210726&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=210726&view=rev</a><br>
Log:<br>
[modules] Add first-draft module maps for Clang. These don't cover everything<br>
yet, but they're enough for a clean bootstrap (with a few local patches that<br>
are yet to be committed).<br>
</blockquote>
<br></div>
Surely it would have made more sense to commit the local patches first?</blockquote><div><br></div><div>Takumi Nakamara wanted to experiment with enabling modules; this patch is a prerequisite for that. The other patches are not (a non-asserts build can bootstrap right now, but an asserts build notices some problems with the internal state...).</div>
<div><br></div><div>The local patches need cleanup and unit testing, but they're my current priority.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Added:<br>
     cfe/trunk/include/clang-c/<u></u>module.modulemap<br>
     cfe/trunk/include/clang/<u></u>module.modulemap<br>
<br>
Added: cfe/trunk/include/clang-c/<u></u>module.modulemap<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/module.modulemap?rev=210726&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang-c/module.modulemap?rev=<u></u>210726&view=auto</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/include/clang-c/<u></u>module.modulemap (added)<br>
+++ cfe/trunk/include/clang-c/<u></u>module.modulemap Wed Jun 11 19:32:32 2014<br>
@@ -0,0 +1,5 @@<br>
+module Clang_C {<br>
+  requires cplusplus<br>
+  umbrella "."<br>
+  module * { export * }<br>
+}<br>
<br>
Added: cfe/trunk/include/clang/<u></u>module.modulemap<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=210726&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang/module.modulemap?rev=<u></u>210726&view=auto</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/include/clang/<u></u>module.modulemap (added)<br>
+++ cfe/trunk/include/clang/<u></u>module.modulemap Wed Jun 11 19:32:32 2014<br>
@@ -0,0 +1,109 @@<br>
+module Clang_Analysis {<br>
+  requires cplusplus<br>
+  umbrella "Analysis"<br>
+<br>
+  // This file is intended for repeated textual inclusion.<br>
+  exclude header "Analysis/Analyses/<u></u>ThreadSafetyOps.def"<br>
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_AST {<br>
+  requires cplusplus<br>
+  umbrella "AST"<br>
+<br>
+  // These files are intended for repeated textual inclusion.<br>
+  exclude header "AST/BuiltinTypes.def"<br>
+  exclude header "AST/TypeLocNodes.def"<br>
+  exclude header "AST/TypeNodes.def"<br>
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_ASTMatchers { requires cplusplus umbrella "ASTMatchers" module * { export * } }<br>
+<br>
+module Clang_Basic {<br>
+  requires cplusplus<br>
+  umbrella "Basic"<br>
+<br>
+  // These files are intended for repeated textual inclusion.<br>
+  exclude header "Basic/BuiltinsAArch64.def"<br>
+  exclude header "Basic/BuiltinsARM64.def"<br>
+  exclude header "Basic/BuiltinsARM.def"<br>
+  exclude header "Basic/Builtins.def"<br>
+  exclude header "Basic/BuiltinsHexagon.def"<br>
+  exclude header "Basic/BuiltinsMips.def"<br>
+  exclude header "Basic/BuiltinsNEON.def"<br>
+  exclude header "Basic/BuiltinsNVPTX.def"<br>
+  exclude header "Basic/BuiltinsPPC.def"<br>
+  exclude header "Basic/BuiltinsX86.def"<br>
+  exclude header "Basic/BuiltinsXCore.def"<br>
+  exclude header "Basic/DiagnosticOptions.def"<br>
+  exclude header "Basic/LangOptions.def"<br>
+  exclude header "Basic/OpenCLExtensions.def"<br>
+  exclude header "Basic/OpenMPKinds.def"<br>
+  exclude header "Basic/OperatorKinds.def"<br>
+  exclude header "Basic/Sanitizers.def"<br>
+  exclude header "Basic/TokenKinds.def"<br>
</blockquote>
<br></div></div>
Isn't there a regex syntax for exclude?<br>
<br>
It doesn't seem reasonable to expect everyone to maintain this list by hand when we already provide a pattern by which they can be trivially detected (the .def suffix).</blockquote><div><br></div><div>Ultimately, the module map should be generated by the build system, which should largely remove this concern. (I'm not opposed to having some kind of pattern syntax here, but the module map syntax is sufficiently unstable that I don't think it's a priority.)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+  // This file is one big layering violation.<br>
+  exclude header "Basic/AllDiagnostics.h"<br>
+<br>
+  // This file includes a header from Lex.<br>
+  exclude header "Basic/PlistSupport.h"<br>
+<br>
+  // FIXME: This is logically a part of Basic, but has been put in the wrong place.<br>
+  header "StaticAnalyzer/Core/<u></u>AnalyzerOptions.h"<br>
</blockquote>
<br></div>
I'll give a hand and look into these three cases if you take care of my post-commit ;-)</blockquote><div><br></div><div>Sure thing, thank you!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_CodeGen { requires cplusplus umbrella "CodeGen" module * { export * } }<br>
+module Clang_Config { requires cplusplus umbrella "Config" module * { export * } }<br>
</blockquote>
<br></div>
Why are you exporting the internal, non-installed config.h header files? Ditto for the module.modulemap in LLVM<br></blockquote><div><br></div><div>The modules are for building LLVM and Clang themselves, not (just) for external consumers of the libraries.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please see <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073707.html" target="_blank">http://lists.cs.uiuc.edu/<u></u>pipermail/llvmdev/2014-June/<u></u>073707.html</a><br>
<br>
Alp.<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+module Clang_Driver {<br>
+  requires cplusplus<br>
+  umbrella "Driver"<br>
+<br>
+  // This file is intended for repeated textual inclusion.<br>
+  exclude header "Driver/Types.def"<br>
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_Edit { requires cplusplus umbrella "Edit" module * { export * } }<br>
+module Clang_Format { requires cplusplus umbrella "Format" module * { export * } }<br>
+<br>
+module Clang_Frontend {<br>
+  requires cplusplus<br>
+  umbrella "Frontend"<br>
+<br>
+  // These files are intended for repeated textual inclusion.<br>
+  exclude header "Frontend/CodeGenOptions.def"<br>
+  exclude header "Frontend/LangStandards.def"<br>
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_FrontendTool { requires cplusplus umbrella "FrontendTool" module * { export * } }<br>
+module Clang_Index { requires cplusplus umbrella "Index" module * { export * } }<br>
+module Clang_Lex { requires cplusplus umbrella "Lex" module * { export * } }<br>
+module Clang_Parse { requires cplusplus umbrella "Parse" module * { export * } }<br>
+module Clang_Rewrite { requires cplusplus umbrella "Rewrite" module * { export * } }<br>
+module Clang_Sema { requires cplusplus umbrella "Sema" module * { export * } }<br>
+module Clang_Serialization { requires cplusplus umbrella "Serialization" module * { export * } }<br>
+<br>
+module Clang_StaticAnalyzer {<br>
+  requires cplusplus<br>
+  umbrella "StaticAnalyzer"<br>
+<br>
+  // This file is intended for repeated textual inclusion.<br>
+  exclude header "StaticAnalyzer/Core/Analyses.<u></u>def"<br>
+<br>
+  // FIXME: This is logically a part of Basic, but has been put in the wrong place.<br>
+  exclude header "StaticAnalyzer/Core/<u></u>AnalyzerOptions.h"<br>
+<br>
+  module * { export * }<br>
+}<br>
+<br>
+module Clang_Tooling { requires cplusplus umbrella "Tooling" module * { export * } }<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br></div></div>