[clang] 9bdc9c9 - [Driver][Fuchsia] Remove relative vtable multilib
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 1 16:29:11 PST 2023
Author: Petr Hosek
Date: 2023-02-02T00:29:00Z
New Revision: 9bdc9c9cf70a054711eaaec81da833ad7936379e
URL: https://github.com/llvm/llvm-project/commit/9bdc9c9cf70a054711eaaec81da833ad7936379e
DIFF: https://github.com/llvm/llvm-project/commit/9bdc9c9cf70a054711eaaec81da833ad7936379e.diff
LOG: [Driver][Fuchsia] Remove relative vtable multilib
We have made relative vtable the default for Fuchsia C++ ABI so this
is no longer needed.
Differential Revision: https://reviews.llvm.org/D143050
Added:
Modified:
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/test/Driver/fuchsia.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp
index a80644b0ec478..d0e035f205ae0 100644
--- a/clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -282,33 +282,8 @@ Fuchsia::Fuchsia(const Driver &D, const llvm::Triple &Triple,
.flag("+fsanitize=hwaddress")
.flag("-fexceptions")
.flag("+fno-exceptions"));
- // Use the relative vtables ABI.
- // TODO: Remove these multilibs once relative vtables are enabled by default
- // for Fuchsia.
- Multilibs.push_back(Multilib("relative-vtables", {}, {}, 6)
- .flag("+fexperimental-relative-c++-abi-vtables"));
- Multilibs.push_back(Multilib("relative-vtables+noexcept", {}, {}, 7)
- .flag("+fexperimental-relative-c++-abi-vtables")
- .flag("-fexceptions")
- .flag("+fno-exceptions"));
- Multilibs.push_back(Multilib("relative-vtables+asan", {}, {}, 8)
- .flag("+fexperimental-relative-c++-abi-vtables")
- .flag("+fsanitize=address"));
- Multilibs.push_back(Multilib("relative-vtables+asan+noexcept", {}, {}, 9)
- .flag("+fexperimental-relative-c++-abi-vtables")
- .flag("+fsanitize=address")
- .flag("-fexceptions")
- .flag("+fno-exceptions"));
- Multilibs.push_back(Multilib("relative-vtables+hwasan", {}, {}, 10)
- .flag("+fexperimental-relative-c++-abi-vtables")
- .flag("+fsanitize=hwaddress"));
- Multilibs.push_back(Multilib("relative-vtables+hwasan+noexcept", {}, {}, 11)
- .flag("+fexperimental-relative-c++-abi-vtables")
- .flag("+fsanitize=hwaddress")
- .flag("-fexceptions")
- .flag("+fno-exceptions"));
// Use Itanium C++ ABI for the compat multilib.
- Multilibs.push_back(Multilib("compat", {}, {}, 12).flag("+fc++-abi=itanium"));
+ Multilibs.push_back(Multilib("compat", {}, {}, 6).flag("+fc++-abi=itanium"));
Multilibs.FilterOut([&](const Multilib &M) {
std::vector<std::string> RD = FilePaths(M);
@@ -324,11 +299,6 @@ Fuchsia::Fuchsia(const Driver &D, const llvm::Triple &Triple,
addMultilibFlag(getSanitizerArgs(Args).needsHwasanRt(), "fsanitize=hwaddress",
Flags);
- addMultilibFlag(
- Args.hasFlag(options::OPT_fexperimental_relative_cxx_abi_vtables,
- options::OPT_fno_experimental_relative_cxx_abi_vtables,
- /*default=*/false),
- "fexperimental-relative-c++-abi-vtables", Flags);
addMultilibFlag(Args.getLastArgValue(options::OPT_fcxx_abi_EQ) == "itanium",
"fc++-abi=itanium", Flags);
diff --git a/clang/test/Driver/fuchsia.cpp b/clang/test/Driver/fuchsia.cpp
index e5640f5826271..01ebcb146ca60 100644
--- a/clang/test/Driver/fuchsia.cpp
+++ b/clang/test/Driver/fuchsia.cpp
@@ -104,41 +104,6 @@
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
// RUN: -fuse-ld=lld 2>&1\
// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-ASAN-NOEXCEPT-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -fno-exceptions \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-NOEXCEPT-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -fsanitize=address \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -fno-exceptions -fsanitize=address \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-NOEXCEPT-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables -fexperimental-relative-c++-abi-vtables \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86
// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fsanitize=hwaddress \
// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
@@ -149,16 +114,6 @@
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
// RUN: -fuse-ld=lld 2>&1\
// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-HWASAN-NOEXCEPT-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -fsanitize=hwaddress \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-X86
-// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -fno-exceptions -fsanitize=hwaddress \
-// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN: -fuse-ld=lld 2>&1\
-// RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-NOEXCEPT-X86
// Test compat multilibs.
// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -fc++-abi=itanium \
@@ -180,13 +135,7 @@
// CHECK-MULTILIB-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}asan"
// CHECK-MULTILIB-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}noexcept"
// CHECK-MULTILIB-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}asan+noexcept"
-// CHECK-MULTILIB-RELATIVE-VTABLES-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables"
-// CHECK-MULTILIB-RELATIVE-VTABLES-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables+noexcept"
-// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables+asan"
-// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables+asan+noexcept"
// CHECK-MULTILIB-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}hwasan"
// CHECK-MULTILIB-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}hwasan+noexcept"
-// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables+hwasan"
-// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}relative-vtables+hwasan+noexcept"
// CHECK-MULTILIB-COMPAT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}compat"
// CHECK-MULTILIB-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia"
More information about the cfe-commits
mailing list