<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks for explanation, Zachary. We’ve fixed the buildbots in a different way, so I’ll discard this patch.<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 2, 2017, at 16:06, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Yes that is the reason.  But in a way it is more than that, because if those variables aren't available to lit.cfg, then test suite won't work.  lit *must* be able to find a site config.</div><div class=""><br class=""></div><div class="">There are three ways to get around this:</div><div class=""><br class=""></div><div class="">1) When you run lit.py, pass it a directory to your build tree.  Then it points right to the site config, and everything works.  The disadvantage to this method is that you might want to just run test, i.e. point lit to a single file in your source tree.  You can't do that with this method.</div><div class=""><br class=""></div><div class="">2) pass param=libcxx_site_config=<path-to-site-config> to lit.  This is cumbersome and a lot of typing.  It might also not work 100% like you expect when used in conjunction with pointing to a single file in source tree.  I don't know, I haven't really tested it.</div><div class=""><br class=""></div><div class="">3) use the generated llvm-lit script.  This embeds the mapping from source tree site config -> build tree site config in the script, so that instead of `lit <path-to-test>` you run `llvm-lit <path-to-test>`.  This way, we can detect that that you are pointing into the source tree, translate that to the build tree, and then load the proper site config automatically.</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Nov 2, 2017 at 3:44 PM Volodymyr Sapsai <<a href="mailto:vsapsai@apple.com" class="">vsapsai@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">On Nov 1, 2017, at 17:22, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank" class="">zturner@google.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="m_8193430181557633582Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 1, 2017 at 5:13 PM Volodymyr Sapsai <<a href="mailto:vsapsai@apple.com" target="_blank" class="">vsapsai@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">On Nov 1, 2017, at 16:47, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank" class="">zturner@google.com</a>> wrote:<br class=""></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><blockquote type="cite" class=""><br class="m_8193430181557633582m_-2225885694232795999Apple-interchange-newline"><div class="">This will remove the ability to use llvm-lit script even if source tree is available.<br class=""></div></blockquote></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class="">Can you please point me to the place where llvm-lit is enabled in configure_lit_site_cfg? Asking for my education, to understand lit configuration better and to avoid breaking it. And how do you test llvm-lit script if source tree is available? I tried to check out libcxx to llvm/projects/, `ninja check-libcxx` worked fine. Though I didn’t use extra options, so this case might not reflect real-world usage.</div></div></div></blockquote><div class=""><br class=""></div><div class="">configure_lit_site_cfg doesn't actually enable llvm-lit generation, but if llvm-lit generation is already enabled, then using configure_lit_site_cfg will cause additional information to be written to the generated llvm-lit script so that you can use bin/llvm-lit <path-to-source-tree>.</div><div class=""><br class=""></div><div class="">I think all you need to do is say:</div><div class=""><br class=""></div><div class="">if (LIBCXX_STANDALONE_BUILD)</div><div class="">  configure_file(...</div><div class="">else()</div><div class="">   configure_lit_site_cfg(...</div><div class="">endif()</div><div class=""><br class=""></div><div class="">If this doesn't work for some reason though, or is too much effort, I'm not opposed to your original patch, since I think llvm-lit script generation is unconditionally disabled for libcxx right now anyway.</div><div class=""> </div></div></div>
</div></blockquote></div><br class=""></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class="">Thanks, now I see that with my change in llvm-lit there is no mapping in config_map for libcxx/test/lit.cfg What is the purpose of this mapping? Is it only to make variables from <a href="http://lit.site/" target="_blank" class="">lit.site</a>.<a href="http://cfg.in/" target="_blank" class="">cfg.in</a> expanded during configuration available to lit.cfg? Or are there some other use cases?</div></div></blockquote></div>
</div></blockquote></div><br class=""></body></html>