Author: Nico Weber Date: 2022-09-14T12:43:24-04:00 New Revision: 5631d20bfc9f77d15435badf6ce34e1a56c27e1c
URL: https://github.com/llvm/llvm-project/commit/5631d20bfc9f77d15435badf6ce34e1a56c27e1c DIFF: https://github.com/llvm/llvm-project/commit/5631d20bfc9f77d15435badf6ce34e1a56c27e1c.diff LOG: Revert "[clang] fix generation of .debug_aranges with LTO" This reverts commit 6bf6730ac55e064edf46915ebba02e9c716f48e8. Breaks tests if LLD isn't being built, see comments on https://reviews.llvm.org/D133092 Added: Modified: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/debug-options.c Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index c61fcfc946b8..22025d95e7c8 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -506,19 +506,6 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, Suffix, Plugin); CmdArgs.push_back(Args.MakeArgString(Plugin)); - } else { - // NOTE: - // - it is not possible to use lld for PS4 - // - addLTOOptions() is not used for PS5 - // Hence no need to handle SCE (like in Clang.cpp::renderDebugOptions()). - // - // But note, this solution is far from perfect, better to encode it into IR - // metadata, but this may not be worth it, since it looks like aranges is - // on the way out. - if (Args.hasArg(options::OPT_gdwarf_aranges)) { - CmdArgs.push_back(Args.MakeArgString("-mllvm")); - CmdArgs.push_back(Args.MakeArgString("-generate-arange-section")); - } } // Try to pass driver level flags relevant to LTO code generation down to diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c index 2da192d098e2..04004716aa50 100644 --- a/clang/test/Driver/debug-options.c +++ b/clang/test/Driver/debug-options.c @@ -246,11 +246,7 @@ // RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=NOPUB %s // RUN: %clang -### -c -glldb -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // -// RUN: %clang -### -target x86_64-unknown-linux -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s -// RUN: %clang -### -target x86_64-unknown-linux -flto -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=LDGARANGE %s -// RUN: %clang -### -target x86_64-unknown-linux -flto=thin -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=LDGARANGE %s -// RUN: %clang -### -target x86_64-unknown-linux -fuse-ld=lld -flto -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=LLDGARANGE %s -// RUN: %clang -### -target x86_64-unknown-linux -fuse-ld=lld -flto=thin -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=LLDGARANGE %s +// RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s // // RUN: %clang -### -fdebug-types-section -target x86_64-unknown-linux %s 2>&1 \ // RUN: | FileCheck -check-prefix=FDTS %s @@ -375,8 +371,6 @@ // NORNGBSE-NOT: -fdebug-ranges-base-address // // GARANGE-DAG: -generate-arange-section -// LDGARANGE-NOT: {{".*lld.*"}} {{.*}} "-generate-arange-section" -// LLDGARANGE: {{".*lld.*"}} {{.*}} "-generate-arange-section" // // FDTS: "-mllvm" "-generate-type-units" // FDTSE: error: unsupported option '-fdebug-types-section' for target 'x86_64-apple-darwin' _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits