<div dir="ltr">Lang, thanks for working!<div><br></div><div>I tweaked in some area.</div><div><br></div><div><div>--- a/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt</div><div>+++ b/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt</div><div>@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS</div><div> add_kaleidoscope_chapter(Kaleidoscope-Ch5</div><div>   toy.cpp</div><div>   )</div><div>+</div><div>+export_executable_symbols(Kaleidoscope-Ch5)</div><div><br></div><div>^It is needed to resolve printd.</div><div><br></div><div><br></div><div>--- a/llvm/test/CMakeLists.txt</div><div>+++ b/llvm/test/CMakeLists.txt</div><div>@@ -1,3 +1,7 @@</div><div>+if(LLVM_BUILD_EXAMPLES)</div><div>+  set(ENABLE_EXAMPLES 1)</div><div>+endif()</div><div>+</div><div> configure_lit_site_cfg(</div><div>   ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in">lit.site.cfg.in</a></div><div>   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg</div><div>@@ -96,6 +100,16 @@ if(TARGET ocaml_llvm)</div><div>         )</div><div> endif()</div><div><br></div><div>+if(LLVM_BUILD_EXAMPLES)</div><div>+  list(APPEND LLVM_TEST_DEPENDS</div><div>+    Kaleidoscope-Ch3</div><div>+    Kaleidoscope-Ch4</div><div>+    Kaleidoscope-Ch5</div><div>+    Kaleidoscope-Ch6</div><div>+    Kaleidoscope-Ch7</div><div>+    )</div><div>+endif()</div><div>+</div><div> add_lit_testsuite(check-llvm "Running the LLVM regression tests"</div><div>   ${CMAKE_CURRENT_BINARY_DIR}</div><div>   PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg</div><div><br></div><div>* LLVM_BUILD_EXAMPLES is BOOL but it has value "ON" or "OFF" as string.</div><div><br></div><div><span style="line-height:1.5;font-size:13.1999998092651px">--- a/llvm/test/Makefile</span><br></div><div>+++ b/llvm/test/Makefile</div><div>@@ -146,6 +146,7 @@ lit.site.cfg: FORCE</div><div>        @$(ECHOPATH) s=@HOST_ARCH@=$(HOST_ARCH)=g >> lit.tmp</div><div>        @$(ECHOPATH) s=@HAVE_LIBZ@=$(HAVE_LIBZ)=g >> lit.tmp</div><div>        @$(ECHOPATH) s=@HAVE_DIA_SDK@=0=g >> lit.tmp</div><div>+       @$(ECHOPATH) s=@ENABLE_EXAMPLES@=$(BUILD_EXAMPLES)=g >> lit.tmp</div><div>        @sed -f lit.tmp $(PROJ_SRC_DIR)/<a href="http://lit.site.cfg.in">lit.site.cfg.in</a> > $@</div><div>        @-rm -f lit.tmp</div><div><br></div><div>* Substitute ENABLE_EXAMPLES with BUILD_EXAMPLES in autoconf build.</div><div><br></div><div><span style="line-height:1.5;font-size:13.1999998092651px">--- a/llvm/test/<a href="http://lit.site.cfg.in">lit.site.cfg.in</a></span><br></div><div>+++ b/llvm/test/<a href="http://lit.site.cfg.in">lit.site.cfg.in</a></div><div>@@ -35,7 +35,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"</div><div> config.have_zlib = "@HAVE_LIBZ@"</div><div> config.have_dia_sdk = @HAVE_DIA_SDK@</div><div> config.enable_ffi = "@LLVM_ENABLE_FFI@"</div><div>-config.test_examples = "@LLVM_BUILD_EXAMPLES@"</div><div>+config.test_examples = "@ENABLE_EXAMPLES@"</div><div><br></div><div> # Support substitution of the tools_dir with user parameters. This is</div><div> # used when we can't determine the tool dir at configuration time.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 27, 2015 at 3:26 PM Lang Hames via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</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">Hi All,<div><br></div><div>The attached patch adds some regression tests for the Kaleidoscope tutorials.</div><div><br></div><div>I've tried to set these up so that they're only run if LLVM_BUILD_EXAMPLES is turned on, but I'm not a build-system/llvm-lit expert, so I'm not certain whether I've done this in the cleanest way. Feedback on that aspect of this patch would be helpful.</div><div><br></div><div>Cheers,</div><div>Lang.</div></div>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>