On 19/05/2014 15:10, Timur Iskhodzhanov wrote:
2014-05-15 11:00 GMT+04:00 Reid Kleckner <[email protected]>:
Maybe we should just run these tests with the gcc driver frontend.
So the problem with that is a combination of the following factors:
a) The ASan lit tests use RUN lines like "%clangxx_asan %s -o %t"
[e.g. see test/asan/TestCases/stack-buffer-overflow.cc]
b) The clang-cl driver doesn't support "-o"
c) By default, %clangxx_asan is COMPILER_RT_TEST_COMPILER
d) We have to use clang-cl to build ASan gtest-based tests as gtest
itself uses exceptions.
Currently clang doesn't support exception, thus clang-cl falls back.
e) COMPILER_RT_TEST_COMPILER is apparently used to build gtest-based tests
[see cmake/Modules/CompilerRTCompile.cmake]
Looks like making any of (a-c,e) false fixes the problems.
Possible solutions are (at least):
A) Use a %exe_out macro in asan lit tests.
This implies a big (yet trivial) diff and a small-but-annoying
maintenance burden for new tests.
B) Add "-o" support to clang-cl, this is being discussed here.
C) We can un-override %clangxx_asan to be clang rather than clang-cl on Windows
Or we could use a wrapper for clang-cl which replaces "-o" with
"-Fo" when lit tests are run...
(there's a "android_commands/android_compile.py" wrapper around anyways)
E) We could set COMPILER_RT_TEST_COMPILER to clang (rather than
clang-cl) and override it for gtest-based tests.
It's fine, even expected to use different a compilers in lit tests than
what's used in unit tests.
E is sounding good -- if the standard driver doesn't work for some
reason just say so we can fix forward, after all sane cross-platform
defaults are a design goal (unlike with clang-cl).
Alp.
Opinions?
--
http://www.nuanti.com
the browser experts
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits