<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 15, 2014 at 9:43 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This breaks the build on Windows<br>
<br>
FAILED: cmd.exe /c cd /D ...\projects\compiler-rt\lib\asan\tests &&<br>
...\bin\clang-cl.exe<br>
ASAN_INST_TEST_OBJECTS.gtest-all.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_asm_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_globals_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_interface_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_oob_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_mem_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_str_test.cc.i386-with-calls.o<br>
ASAN_INST_TEST_OBJECTS.asan_test_main.cc.i386-with-calls.o<br>
-Fe".../projects/compiler-rt/lib/asan/tests/Asan-i386-with-calls-Test"<br>
/machine:X86 /STACK:10000000 -fsanitize=address<br>
clang-cl.exe: error: no such file or directory: '/machine:X86'<br>
<br>
clang-cl.exe: error: no such file or directory: '/STACK:10000000'<br></blockquote><div><br></div><div>Is it that you can't use '/' spelled flags after the file arguments? Does the patch here fix? <a href="http://paste2.org/8X69zf0v">http://paste2.org/8X69zf0v</a></div>
<div><br></div><div>I'm asking others to test as well and will commit if i get the indication that this fixes things.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
2014-05-15 19:21 GMT+04:00 Chandler Carruth <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>>:<br>
<div class=""><div class="h5">> Author: chandlerc<br>
> Date: Thu May 15 10:21:11 2014<br>
> New Revision: 208896<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=208896&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=208896&view=rev</a><br>
> Log:<br>
> Teach the compiler-rt custom compilation and linking CMake rules used<br>
> for sanitizers to pass the C++ compilation and exe linking flags through<br>
> from the host CMake configuration. We pass the target flags afterward,<br>
> allowing them to trump flags as needed. This is particularly important<br>
> when the flags direct Clang, even the just-built-Clang, toward the<br>
> standard library, linker, and other tools to use.<br>
><br>
> Modified:<br>
>     compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake<br>
><br>
> Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=208896&r1=208895&r2=208896&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=208896&r1=208895&r2=208896&view=diff</a><br>

> ==============================================================================<br>
> --- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)<br>
> +++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Thu May 15 10:21:11 2014<br>
> @@ -14,7 +14,7 @@ macro(add_compiler_rt_object_library nam<br>
>      parse_arguments(LIB "SOURCES;CFLAGS;DEFS" "" ${ARGN})<br>
>      add_library(${name}.${arch} OBJECT ${LIB_SOURCES})<br>
>      set_target_compile_flags(${name}.${arch}<br>
> -      ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})<br>
> +      ${CMAKE_CXX_FLAGS} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})<br>
>      set_property(TARGET ${name}.${arch} APPEND PROPERTY<br>
>        COMPILE_DEFINITIONS ${LIB_DEFS})<br>
>    else()<br>
> @@ -136,6 +136,8 @@ macro(add_compiler_rt_test test_suite te<br>
>    if(NOT COMPILER_RT_STANDALONE_BUILD)<br>
>      list(APPEND TEST_DEPS clang)<br>
>    endif()<br>
> +  set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}")<br>
> +  separate_arguments(TEST_LINK_FLAGS)<br>
>    add_custom_target(${test_name}<br>
>      # MSVS CL doesn't allow a space between -Fe and the output file name.<br>
>      COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS}<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>