[compiler-rt] r273914 - Parse the triple in base-config-ix to propagate ANDROID variable correctly

Evgenii Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 13:45:10 PDT 2016


http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/21691/steps/build%20fresh%20clang%20%2B%20debug%20compiler-rt/logs/stdio

CMake Error at cmake/base-config-ix.cmake:72 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:34 (include)

On Mon, Jun 27, 2016 at 12:46 PM, Sumanth Gundapaneni via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: sgundapa
> Date: Mon Jun 27 14:46:50 2016
> New Revision: 273914
>
> URL: http://llvm.org/viewvc/llvm-project?rev=273914&view=rev
> Log:
> Parse the triple in base-config-ix to propagate ANDROID variable correctly
>
> The triple must be parsed in base-config-ix.cmake.
> Otherwise, the cmake variable ANDROID won't be set and this
> will confuse cmake to build unsupported targets targeted for
> android.
>
> Diferential revision: http://reviews.llvm.org/D21474
>
> Modified:
>     compiler-rt/trunk/CMakeLists.txt
>     compiler-rt/trunk/cmake/base-config-ix.cmake
>
> Modified: compiler-rt/trunk/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=273914&r1=273913&r2=273914&view=diff
> ==============================================================================
> --- compiler-rt/trunk/CMakeLists.txt (original)
> +++ compiler-rt/trunk/CMakeLists.txt Mon Jun 27 14:46:50 2016
> @@ -86,18 +86,6 @@ if (COMPILER_RT_STANDALONE_BUILD)
>    set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
>  endif()
>
> -set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING
> -    "Default triple for which compiler-rt runtimes will be built.")
> -if(DEFINED COMPILER_RT_TEST_TARGET_TRIPLE)
> -  # Backwards compatibility: this variable used to be called
> -  # COMPILER_RT_TEST_TARGET_TRIPLE.
> -  set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${COMPILER_RT_TEST_TARGET_TRIPLE})
> -endif()
> -
> -string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
> -list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
> -list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_DEFAULT_TARGET_OS)
> -list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_DEFAULT_TARGET_ABI)
>  # Determine if test target triple is specified explicitly, and doesn't match the
>  # default.
>  if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)
>
> Modified: compiler-rt/trunk/cmake/base-config-ix.cmake
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/base-config-ix.cmake?rev=273914&r1=273913&r2=273914&view=diff
> ==============================================================================
> --- compiler-rt/trunk/cmake/base-config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/base-config-ix.cmake Mon Jun 27 14:46:50 2016
> @@ -61,6 +61,19 @@ else()
>    set(COMPILER_RT_TEST_COMPILER_ID GNU)
>  endif()
>
> +set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING
> +    "Default triple for which compiler-rt runtimes will be built.")
> +if(DEFINED COMPILER_RT_TEST_TARGET_TRIPLE)
> +  # Backwards compatibility: this variable used to be called
> +  # COMPILER_RT_TEST_TARGET_TRIPLE.
> +  set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${COMPILER_RT_TEST_TARGET_TRIPLE})
> +endif()
> +
> +string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
> +list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
> +list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_DEFAULT_TARGET_OS)
> +list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_DEFAULT_TARGET_ABI)
> +
>  if ("${COMPILER_RT_DEFAULT_TARGET_ABI}" STREQUAL "androideabi")
>    set(ANDROID 1)
>  endif()
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list