<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This seems to be breaking the regression tests for me on OS X, with Python 2.7 and CMake 2.8.4.  Specifically, the line:</div><div><br></div><div>config.enable_assertions = @LLVM_ENABLE_ASSERTIONS@</div><div><br></div><div>For me, this is being configured as:</div><div><br></div><div>config.enable_assertions = ON</div><div><br></div><div>which is invalid Python (symbol 'ON' does not exist).  Manually changing this to:</div><div><br></div><div>config.enable_assertions = 1</div><div><br></div><div>fixes the issue.</div><div><br></div><div><br></div><div>Seems to be a CMake naming issue (using ON instead of 1)</div><br><div><div>On Jun 22, 2011, at 7:23 PM, Andrew Trick wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: atrick<br>Date: Wed Jun 22 18:23:19 2011<br>New Revision: 133664<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=133664&view=rev">http://llvm.org/viewvc/llvm-project?rev=133664&view=rev</a><br>Log:<br>lit support for REQUIRES: asserts.<br><br>Take #2. Don't piggyback on the existing config.build_mode. Instead,<br>define a new lit feature for each build feature we need (currently<br>just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define<br>this feature within test/lit.site.cfg. This doesn't require any lit<br>harness changes and should be more robust across build systems.<br><br>Modified:<br>    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake<br>    llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll<br>    llvm/trunk/test/Makefile<br>    llvm/trunk/test/lit.cfg<br>    llvm/trunk/test/lit.site.cfg.in<br>    llvm/trunk/utils/lit/lit/TestRunner.py<br>    llvm/trunk/utils/lit/lit/TestingConfig.py<br><br>Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)<br>+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Jun 22 18:23:19 2011<br>@@ -36,13 +36,8 @@<br>   # explicitly undefine it:<br>   if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )<br>     add_definitions( -UNDEBUG )<br>-    set(LLVM_BUILD_MODE "Release")<br>-  else()<br>-    set(LLVM_BUILD_MODE "Debug")<br>   endif()<br>-  set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}+Asserts")<br> else()<br>-  set(LLVM_BUILD_MODE "Release")<br>   if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )<br>     if( NOT MSVC_IDE AND NOT XCODE )<br>       add_definitions( -DNDEBUG )<br><br>Modified: llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll (original)<br>+++ llvm/trunk/test/CodeGen/X86/2011-06-14-PreschedRegalias.ll Wed Jun 22 18:23:19 2011<br>@@ -1,5 +1,5 @@<br> ; RUN: llc < %s -march=x86-64 -stress-sched | FileCheck %s<br>-; REQUIRES: Asserts<br>+; REQUIRES: asserts<br> ; Test interference between physreg aliases during preRAsched.<br> ; mul wants an operand in AL, but call clobbers it.<br><br><br>Modified: llvm/trunk/test/Makefile<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/test/Makefile (original)<br>+++ llvm/trunk/test/Makefile Wed Jun 22 18:23:19 2011<br>@@ -171,15 +171,21 @@<br> <span class="Apple-tab-span" style="white-space:pre">       </span>@test ! -f site.exp || mv site.exp site.bak<br> <span class="Apple-tab-span" style="white-space:pre">      </span>@mv site.tmp site.exp<br><br>+ifeq ($(DISABLE_ASSERTIONS),1)<br>+ENABLE_ASSERTIONS=0<br>+else<br>+ENABLE_ASSERTIONS=1<br>+endif<br>+<br> lit.site.cfg: site.exp<br> <span class="Apple-tab-span" style="white-space:pre">  </span>@echo "Making LLVM 'lit.site.cfg' file..."<br> <span class="Apple-tab-span" style="white-space:pre">     </span>@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre"> </span>@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre">     </span>@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp<br>-<span class="Apple-tab-span" style="white-space:pre">    </span>@$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre"> </span>@$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre">     </span>@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre">     </span>@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp<br>+<span class="Apple-tab-span" style="white-space:pre">       </span>@$(ECHOPATH) s=@LLVM_ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp<br> <span class="Apple-tab-span" style="white-space:pre">  </span>@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@<br> <span class="Apple-tab-span" style="white-space:pre">  </span>@-rm -f lit.tmp<br><br><br>Modified: llvm/trunk/test/lit.cfg<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/test/lit.cfg (original)<br>+++ llvm/trunk/test/lit.cfg Wed Jun 22 18:23:19 2011<br>@@ -306,3 +306,6 @@<br><br> if loadable_module:<br>     config.available_features.add('loadable_module')<br>+<br>+if config.enable_assertions:<br>+    config.available_features.add('asserts')<br><br>Modified: llvm/trunk/test/lit.site.cfg.in<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.in?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.in?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/test/lit.site.cfg.in (original)<br>+++ llvm/trunk/test/lit.site.cfg.in Wed Jun 22 18:23:19 2011<br>@@ -5,9 +5,9 @@<br> config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"<br> config.llvmgcc_dir = "@LLVMGCCDIR@"<br> config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"<br>-config.llvm_build_modes = "@LLVM_BUILD_MODE@".split('+')<br> config.python_executable = "@PYTHON_EXECUTABLE@"<br> config.enable_shared = @ENABLE_SHARED@<br>+config.enable_assertions = @LLVM_ENABLE_ASSERTIONS@<br><br> # Support substitution of the tools_dir with user parameters. This is<br> # used when we can't determine the tool dir at configuration time.<br><br>Modified: llvm/trunk/utils/lit/lit/TestRunner.py<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/utils/lit/lit/TestRunner.py (original)<br>+++ llvm/trunk/utils/lit/lit/TestRunner.py Wed Jun 22 18:23:19 2011<br>@@ -473,11 +473,9 @@<br>     if script[-1][-1] == '\\':<br>         return (Test.UNRESOLVED, "Test has unterminated run lines (with '\\')")<br><br>-    # Check that we have the required features or build modes:<br>+    # Check that we have the required features:<br>     missing_required_features = [f for f in requires<br>-                                 if f not in test.config.available_features<br>-                                 and f not in test.config.llvm_build_modes]<br>-<br>+                                 if f not in test.config.available_features]<br>     if missing_required_features:<br>         msg = ', '.join(missing_required_features)<br>         return (Test.UNSUPPORTED,<br><br>Modified: llvm/trunk/utils/lit/lit/TestingConfig.py<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestingConfig.py?rev=133664&r1=133663&r2=133664&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestingConfig.py?rev=133664&r1=133663&r2=133664&view=diff</a><br>==============================================================================<br>--- llvm/trunk/utils/lit/lit/TestingConfig.py (original)<br>+++ llvm/trunk/utils/lit/lit/TestingConfig.py Wed Jun 22 18:23:19 2011<br>@@ -74,7 +74,6 @@<br><br>     def clone(self, path):<br>         # FIXME: Chain implementations?<br>-        # See attribute chaining in finish()<br>         #<br>         # FIXME: Allow extra parameters?<br>         cfg = TestingConfig(self, self.name, self.suffixes, self.test_format,<br>@@ -102,9 +101,3 @@<br>             # files. Should we distinguish them?<br>             self.test_source_root = str(self.test_source_root)<br>         self.excludes = set(self.excludes)<br>-<br>-        # chain attributes by copying them<br>-        if self.parent:<br>-            for k,v in vars(self.parent).items():<br>-                if not hasattr(self, k):<br>-                    setattr(self, k, v)<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Thanks,<br><br>Justin Holewinski</span>
</div>
<br></body></html>