[Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions
authorPetr Hosek <phosek@chromium.org>
Sat, 27 Apr 2019 00:25:13 +0000 (00:25 +0000)
committerPetr Hosek <phosek@chromium.org>
Sat, 27 Apr 2019 00:25:13 +0000 (00:25 +0000)
commitb58561baa509f26709caaa06d2666834f51431ea
tree5a669a9ed22661c1e9dd22b9ce7b9612edbd0a30
parent0f9f021d05ac0697b1baf4f79916e8c97208d58d
[Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

This introduces a support for multilibs to Fuchsia driver. Unlike the
existing multilibs that are used primarily for handling different
architecture variants, we use multilibs to handle different variants
of Clang runtime libraries: -fsanitize=address and -fno-exceptions
are the two we support initially. This replaces the existing support
for sanitized runtimes libraries that was only used by Fuchsia driver
and it also refactors some of the logic to allow sharing between GNU
and Fuchsia drivers.

Differential Revision: https://reviews.llvm.org/D61040

llvm-svn: 359360
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.h
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/aarch64-fuchsia/lib/noexcept/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/x86_64-fuchsia/lib/noexcept/.keep [new file with mode: 0644]
clang/test/Driver/fuchsia.cpp