[compiler-rt] r216083 - Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS

Timur Iskhodzhanov timurrrr at google.com
Mon Aug 25 07:24:12 PDT 2014


This has introduced new warnings on the Windows build:

[27/66] Building CXX object
projects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.i386.dir\sanitizer_symbolizer_libbacktrace.cc.obj
cl : Command line warning D9002 : ignoring unknown option '/machine:X86'
cl : Command line warning D9002 : ignoring unknown option '/STACK:10000000'
[etc for all the TUs]

It could be that
- we were passing wrong options for a long time, but they were dropped
on the floor below
- we've started passing options we shouldn't have added


2014-08-20 21:12 GMT+04:00 Alexey Samsonov <vonosmas at gmail.com>:
> Author: samsonov
> Date: Wed Aug 20 12:12:58 2014
> New Revision: 216083
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216083&view=rev
> Log:
> Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
> when testing for supported architectures, as suggested by Andy Gibbs.
>
>
> Modified:
>     compiler-rt/trunk/cmake/config-ix.cmake
>
> Modified: compiler-rt/trunk/cmake/config-ix.cmake
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=216083&r1=216082&r2=216083&view=diff
> ==============================================================================
> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/config-ix.cmake Wed Aug 20 12:12:58 2014
> @@ -66,10 +66,14 @@ file(WRITE ${SIMPLE_SOURCE} "#include <s
>  # architecture is supported by trying to build a simple file.
>  macro(test_target_arch arch)
>    set(TARGET_${arch}_CFLAGS ${ARGN})
> +  set(argstring "${CMAKE_EXE_LINKER_FLAGS}")
> +  foreach(arg ${ARGN})
> +    set(argstring "${argstring} ${arg}")
> +  endforeach()
>    try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE}
>                COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}"
>                OUTPUT_VARIABLE TARGET_${arch}_OUTPUT
> -              CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_${arch}_CFLAGS}")
> +              CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}")
>    if(${CAN_TARGET_${arch}})
>      list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
>    elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}" OR
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list