[llvm-branch-commits] [compiler-rt-branch] r243608 - Merging r243604:

Hans Wennborg hans at hanshq.net
Wed Jul 29 19:04:27 PDT 2015


Author: hans
Date: Wed Jul 29 21:04:27 2015
New Revision: 243608

URL: http://llvm.org/viewvc/llvm-project?rev=243608&view=rev
Log:
Merging r243604:
------------------------------------------------------------------------
r243604 | hans | 2015-07-29 18:45:17 -0700 (Wed, 29 Jul 2015) | 13 lines

[CMake] Pass -march=i686 when targeting i686 (PR24222)

Clang will not define __i686__, even when the target triple is i686,
without -march=i686.

With this patch, the compiler-rt build will successfully detect that
Clang can target i686.

The open_memstream.cc test is a little funny. Before my patch, it
was invoked with "-m32 -m64". To make it work after my -march
change, I had to add '-march=x86-64'.

Differential Revision: http://reviews.llvm.org/D11618
------------------------------------------------------------------------

Modified:
    compiler-rt/branches/release_37/   (props changed)
    compiler-rt/branches/release_37/cmake/config-ix.cmake
    compiler-rt/branches/release_37/test/sanitizer_common/TestCases/Linux/open_memstream.cc

Propchange: compiler-rt/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 29 21:04:27 2015
@@ -1 +1 @@
-/compiler-rt/trunk:242350,242424,242444,242449,242539-242540,242647,242651,243170
+/compiler-rt/trunk:242350,242424,242444,242449,242539-242540,242647,242651,243170,243604

Modified: compiler-rt/branches/release_37/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_37/cmake/config-ix.cmake?rev=243608&r1=243607&r2=243608&view=diff
==============================================================================
--- compiler-rt/branches/release_37/cmake/config-ix.cmake (original)
+++ compiler-rt/branches/release_37/cmake/config-ix.cmake Wed Jul 29 21:04:27 2015
@@ -179,7 +179,8 @@ else()
       # FIXME: We build runtimes for both i686 and i386, as "clang -m32" may
       # target different variant than "$CMAKE_C_COMPILER -m32". This part should
       # be gone after we resolve PR14109.
-      test_target_arch(i686 __i686__ "-m32")
+      # Use -march to make sure Clang defines __i686__; see PR24222.
+      test_target_arch(i686 __i686__ "-m32" "-march=i686")
       test_target_arch(i386 __i386__ "-m32")
     else()
       if (CMAKE_SIZEOF_VOID_P EQUAL 4)

Modified: compiler-rt/branches/release_37/test/sanitizer_common/TestCases/Linux/open_memstream.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_37/test/sanitizer_common/TestCases/Linux/open_memstream.cc?rev=243608&r1=243607&r2=243608&view=diff
==============================================================================
--- compiler-rt/branches/release_37/test/sanitizer_common/TestCases/Linux/open_memstream.cc (original)
+++ compiler-rt/branches/release_37/test/sanitizer_common/TestCases/Linux/open_memstream.cc Wed Jul 29 21:04:27 2015
@@ -1,5 +1,5 @@
-// RUN: %clangxx -m64 -O0 -g -xc++ %s -o %t && %run %t
-// RUN: %clangxx -m64 -O3 -g -xc++ %s -o %t && %run %t
+// RUN: %clangxx -m64 -march=x86-64 -O0 -g -xc++ %s -o %t && %run %t
+// RUN: %clangxx -m64 -march=x86-64 -O3 -g -xc++ %s -o %t && %run %t
 // REQUIRES: x86_64-supported-target
 
 #include <assert.h>





More information about the llvm-branch-commits mailing list