https://github.com/ls-Mou created https://github.com/llvm/llvm-project/pull/72089
-rdynamic option should not use with -static, as shown in the following code https://github.com/llvm/llvm-project/blob/f86770aa073ac9c17d9ccb6409254e879dca2de6/clang/lib/Driver/ToolChains/Gnu.cpp#L460-L472 So I think the code in line 420-421 should be deleted. https://github.com/llvm/llvm-project/blob/f86770aa073ac9c17d9ccb6409254e879dca2de6/clang/lib/Driver/ToolChains/Gnu.cpp#L420-L421 >From 0e4b8c89eaa5d89698b5085589f7bdca3a477e47 Mon Sep 17 00:00:00 2001 From: ls-Mou <moulongsh...@huawei.com> Date: Mon, 13 Nov 2023 15:01:16 +0800 Subject: [PATCH] [clang] -rdynamic option -rdynamic option should not use with -static --- clang/lib/Driver/ToolChains/Gnu.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 19dff4ec4d45e08..6c0041279de5a27 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -417,9 +417,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("text"); } - if (Args.hasArg(options::OPT_rdynamic)) - CmdArgs.push_back("-export-dynamic"); - if (Args.hasArg(options::OPT_s)) CmdArgs.push_back("-s"); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits