{"id":676,"date":"2018-01-21T02:10:18","date_gmt":"2018-01-20T18:10:18","guid":{"rendered":"https:\/\/carlos.aboutmy.info\/blog\/?p=676"},"modified":"2018-01-21T02:16:02","modified_gmt":"2018-01-20T18:16:02","slug":"clang-cl-crashed-when-building-chromium","status":"publish","type":"post","link":"https:\/\/carlos.aboutmy.info\/blog\/?p=676","title":{"rendered":"clang-cl crashed when building Chromium"},"content":{"rendered":"<p>The clang-cl crash is a known issue (<a href=\"http:\/\/crbug.com\/780124\" target=\"_blank\" rel=\"noopener\">crbug.com\/780124)<\/a> when building Chromium on Windows. The clang team has fixed it but not yet shipped. The bug only happens with precompiled headers so the workaround is to add this to gn args:<\/p>\n<p><code>enable_precompiled_headers = false<\/code><\/p>\n<p>&#8212;&#8212;<\/p>\n<p>\u5f88\u4e45\u6c92\u6709 build \u904e Windows \u7248\u7684  Chromium \u4e86\u3002\u8fd1\u4f86\u591a\u7528\u8fd4 Windows\uff0c\u6c7a\u5b9a\u66f4\u65b0\u4e00\u4e0b\u3002<\/p>\n<blockquote><p>&gt; ninja -C out\\Default chrome<\/p><\/blockquote>\n<p>\u4f46\u7d50\u679c\u7b2c\u4e00\u500b file \u5c31 compile failure\uff01<\/p>\n<p><code>ninja: Entering directory `out\\Default'<br \/>\n[1\/33138] CXX obj\/base\/base\/precompile.cc.obj<br \/>\nFAILED: obj\/base\/base\/precompile.cc.obj<br \/>\n..\/..\/third_party\/llvm-build\/Release+Asserts\/bin\/clang-cl.exe \/nologo \/showIncludes  @obj\/base\/base\/precompile.cc.obj.rsp \/c ..\/..\/build\/precompile.cc \/Foobj\/base\/base\/precompile.cc.obj \/Fd\"obj\/base\/base_cc.pdb\"<br \/>\nAssertion failed: ID &lt; FilenamesByID.size() &amp;&amp; \"Invalid FilenameID\", file C:\\b\\rr\\tmpcwzqyv\\w\\src\\third_party\\llvm\\tools\\clang\\include\\clang\/Basic\/SourceManagerInternals.h, line 105<br \/>\nWrote crash dump file \"%USERPROFILE%\\AppData\\Local\\Temp\\clang-cl.exe-66ddaa.dmp\"<\/code><\/p>\n<p>\u539f\u4f86 clang-cl \u5d29\u6f70\u662f\u4e00\u500b\u5df2\u77e5\u554f\u984c <a href=\"http:\/\/crbug.com\/780124\" target=\"_blank\" rel=\"noopener\">crbug.com\/780124<\/a>\uff0cclang team \u5df2\u89e3\u6c7a\u4f46\u9084\u672a\u5305\u88dd\u51fa\u4f86\uff0c\u7531\u65bc\u53ea\u6703\u5728 precompiled headers \u51fa\u554f\u984c\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728 gn args \u52a0\u5165 <code>enable_precompiled_headers = false<\/code> \u4fbf\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The clang-cl crash is a known issue (crbug.com\/780124) when building Chromium on Windows. The clang team has fixed it but not yet shipped. The bug only happens with precompiled headers so the workaround is to add this to gn args: enable_precompiled_headers = false &#8212;&#8212; \u5f88\u4e45\u6c92\u6709 build \u904e Windows \u7248\u7684 Chromium \u4e86\u3002\u8fd1\u4f86\u591a\u7528\u8fd4 Windows\uff0c\u6c7a\u5b9a\u66f4\u65b0\u4e00\u4e0b\u3002 &gt; ninja -C\u2026 <span class=\"read-more\"><a href=\"https:\/\/carlos.aboutmy.info\/blog\/?p=676\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/676"}],"collection":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=676"}],"version-history":[{"count":8,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":684,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/676\/revisions\/684"}],"wp:attachment":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}