<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, May 3, 2017 at 9:49 AM Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hypothetically you could hack this in with our existing environment override option, CCC_OVERRIDE_OPTIONS, like so:<div>ninja all</div><div>export CCC_OVERRIDE_OPTIONS=#^--target=$triple</div><div># run lit tests</div></div></blockquote><div><br></div><div>It's an option just in clang driver. It doesn't affect to other clang tools (including libclang), and LLVM.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'd rather not make a new, easier to use environment variable because it will encourage people to use it for production cross-compilation. The existing mechanism is probably good enough for testing purposes.</div></div></blockquote><div><br></div><div>Agreed partially. I won't introduce such an option in release binaries.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Tue, May 2, 2017 at 5:26 PM, NAKAMURA Takumi via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have been working for extending test coverage for years.<div>Nowadays, I have several cross-testing (target != host). See <a href="http://bb.pgr.jp/console" target="_blank">http://bb.pgr.jp/console</a></div><div>Each of them (test-*-linux) is doing;</div><div><br></div><div>  - Assume a preceding builder passes with warming ccache.</div><div>  - All compilation units will hit ccache whenever the tree is built before lit.</div><div>  - Almost all compilation units will hit ccache except for Host.cpp when the tree is built with different LLVM_DEFAULT_TARGET_TRIPLE.</div><div><br></div><div>FYI, I am doing a trick to let ccache recognize compilation units identical for build.ninja;</div><div><br></div><div>  $ <span style="color:blue;font-family:"courier new",courier,monotype,monospace;font-size:medium;white-space:pre-wrap">sed -i -r 's=(-I|_COMPILER\S* )/home/bb/\w[^/]*/llvm-project=\1../llvm-project=g' build.ninja</span></div><div><br></div><div><div>In other words, testing builders have almost same build except for Host.cpp.</div><div>I have to build the tree for each testing target.</div><div><br></div><div>I propose an option to override LLVM_DEFAULT_TARGET_TRIPLE in run-time.</div></div><div>The change will be small but I wonder which option I could take.</div><div>Please let me know your suggestions.</div><div><br></div><div>* Should it be configurable option?</div><div><br></div><div>I think it shouldn't be required for release binaries, and it wouldn't be required for most developers.</div><div>I think it may be off by default.</div><div><br></div><div>* What is the name of environment variable?</div><div><br></div><div>I suggest the name itself could be configurable.</div><div>If I would introduce the envvar name as "LLVM_TARGET", clang users would complain why clang didn't have like "CLANG_TARGET".</div><div><br></div><div>  $ cmake -DLLVM_DEFAULT_TARGET_ENVVAR_NAME=LLVM_TARGET</div><div>  $ LLVM_TARGET=i686-win32 bin/llvm-lit path/to/tests</div><div><br></div><div>This feature may be disabled if LLVM_DEFAULT_TARGET_ENVVAR_NAME is blank.</div><div>I wonder the name LLVM_DEFAULT_TARGET_ENVVAR_NAME<span class="m_-8345509033601892659m_-3189862068435755808m_-8779104378606884352inbox-inbox-Apple-converted-space"> might be weird.</span></div><div>Better suggestions are welcome.</div><div><br></div><div>As a future plan, I will implement, in Lit, run tests with the matrix of triples,</div><div>like {arm|mips|i686|x86_64}-{darwin|linux|win32}.</div><div>Some of tests should be skipped if it isn't affected to default target triple.</div><div>For example, FileCheck </div><div><br></div><div>Regards, Takumi</div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div>