[compiler-rt] r208896 - Teach the compiler-rt custom compilation and linking CMake rules used

Timur Iskhodzhanov timurrrr at google.com
Thu May 15 08:43:37 PDT 2014


This breaks the build on Windows

FAILED: cmd.exe /c cd /D ...\projects\compiler-rt\lib\asan\tests &&
...\bin\clang-cl.exe
ASAN_INST_TEST_OBJECTS.gtest-all.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_asm_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_globals_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_interface_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_oob_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_mem_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_str_test.cc.i386-with-calls.o
ASAN_INST_TEST_OBJECTS.asan_test_main.cc.i386-with-calls.o
-Fe".../projects/compiler-rt/lib/asan/tests/Asan-i386-with-calls-Test"
/machine:X86 /STACK:10000000 -fsanitize=address
clang-cl.exe: error: no such file or directory: '/machine:X86'

clang-cl.exe: error: no such file or directory: '/STACK:10000000'

2014-05-15 19:21 GMT+04:00 Chandler Carruth <chandlerc at gmail.com>:
> Author: chandlerc
> Date: Thu May 15 10:21:11 2014
> New Revision: 208896
>
> URL: http://llvm.org/viewvc/llvm-project?rev=208896&view=rev
> Log:
> Teach the compiler-rt custom compilation and linking CMake rules used
> for sanitizers to pass the C++ compilation and exe linking flags through
> from the host CMake configuration. We pass the target flags afterward,
> allowing them to trump flags as needed. This is particularly important
> when the flags direct Clang, even the just-built-Clang, toward the
> standard library, linker, and other tools to use.
>
> Modified:
>     compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
>
> Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=208896&r1=208895&r2=208896&view=diff
> ==============================================================================
> --- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
> +++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Thu May 15 10:21:11 2014
> @@ -14,7 +14,7 @@ macro(add_compiler_rt_object_library nam
>      parse_arguments(LIB "SOURCES;CFLAGS;DEFS" "" ${ARGN})
>      add_library(${name}.${arch} OBJECT ${LIB_SOURCES})
>      set_target_compile_flags(${name}.${arch}
> -      ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
> +      ${CMAKE_CXX_FLAGS} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
>      set_property(TARGET ${name}.${arch} APPEND PROPERTY
>        COMPILE_DEFINITIONS ${LIB_DEFS})
>    else()
> @@ -136,6 +136,8 @@ macro(add_compiler_rt_test test_suite te
>    if(NOT COMPILER_RT_STANDALONE_BUILD)
>      list(APPEND TEST_DEPS clang)
>    endif()
> +  set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}")
> +  separate_arguments(TEST_LINK_FLAGS)
>    add_custom_target(${test_name}
>      # MSVS CL doesn't allow a space between -Fe and the output file name.
>      COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS}
>
>
> _______________________________________________
> 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