Here's more context of what Nikola's trying to do:
The goal of Nikola's project is to get a Clang-Asan build of Chrome that uses the SyzyAsan runtime to perform all the access checks and the error reporting (rather than the typical Asan runtime library), the (long term) goal of this is to be able to ship a Clang-Asan build of Chrome to Chrome's Canary channel and drop the Syzygy instrumentation pipeline (which only work on the MSVC compiled binaries). There's a bunch of reason for this but this is beyond the scope of this email :).
In Syzygy we have some integration tests to ensure that the SyzyAsan runtime detects all the kind of error that we want to catch (use-after-free, heap-buffer-overflow...) are reported properly (to make sure that these crashes get reported to the Crash server with all the useful information). We'd like to also build these tests with Clang with the Asan instrumentation turned on to make sure that we have some good coverage of the integration between Clang-Asan and the SyzyAsan runtime library.
So what we really want in our project is:
- Compile all the projects with MSVS like we're currently doing...
- ... except for the 'integration_tests_clang' target, which should be built with Clang.
I think that supporting an hybrid toolchain in Gyp will be quite complex, and our integration test targets is a rather simple target (only a few .cc files), so the idea was to use a "custom" build target that run a somewhat hardcoded command (e.g. "clang-cl.exe /all_the_needed_flags integration_tests.cc"), we have something similar quite similar in Syzygy so I think that Nikola can just look at this as an example:
https://github.com/google/syzygy/blob/master/syzygy/test_data/test_data.gyp#L63 (a target with type='none' and some custom actions).