Author: maskray Date: Fri May 10 18:14:50 2019 New Revision: 360495 URL: http://llvm.org/viewvc/llvm-project?rev=360495&view=rev Log: [cc1as] Change -compress-debug-sections= to use --
The double dash form is documented by GNU as, used by gcc, and accepted by llvm-mc. Modified: cfe/trunk/include/clang/Driver/CC1Options.td cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/lib/Driver/ToolChains/Gnu.cpp cfe/trunk/test/Driver/compress-noias.c cfe/trunk/test/Driver/compress.c Modified: cfe/trunk/include/clang/Driver/CC1Options.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=360495&r1=360494&r2=360495&view=diff ============================================================================== --- cfe/trunk/include/clang/Driver/CC1Options.td (original) +++ cfe/trunk/include/clang/Driver/CC1Options.td Fri May 10 18:14:50 2019 @@ -178,7 +178,7 @@ def record_command_line : Separate<["-"] HelpText<"The string to embed in the .LLVM.command.line section.">; def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">, HelpText<"DWARF debug sections compression">; -def compress_debug_sections_EQ : Joined<["-"], "compress-debug-sections=">, +def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">, HelpText<"DWARF debug sections compression type">; def mno_exec_stack : Flag<["-"], "mnoexecstack">, HelpText<"Mark the file as not needing an executable stack">; Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=360495&r1=360494&r2=360495&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri May 10 18:14:50 2019 @@ -1007,7 +1007,7 @@ static void RenderDebugInfoCompressionAr if (checkDebugInfoOption(A, Args, D, TC)) { if (A->getOption().getID() == options::OPT_gz) { if (llvm::zlib::isAvailable()) - CmdArgs.push_back("-compress-debug-sections"); + CmdArgs.push_back("--compress-debug-sections"); else D.Diag(diag::warn_debug_compression_unavailable); return; @@ -1015,11 +1015,11 @@ static void RenderDebugInfoCompressionAr StringRef Value = A->getValue(); if (Value == "none") { - CmdArgs.push_back("-compress-debug-sections=none"); + CmdArgs.push_back("--compress-debug-sections=none"); } else if (Value == "zlib" || Value == "zlib-gnu") { if (llvm::zlib::isAvailable()) { CmdArgs.push_back( - Args.MakeArgString("-compress-debug-sections=" + Twine(Value))); + Args.MakeArgString("--compress-debug-sections=" + Twine(Value))); } else { D.Diag(diag::warn_debug_compression_unavailable); } Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=360495&r1=360494&r2=360495&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Fri May 10 18:14:50 2019 @@ -627,14 +627,12 @@ void tools::gnutools::Assembler::Constru if (const Arg *A = Args.getLastArg(options::OPT_gz, options::OPT_gz_EQ)) { if (A->getOption().getID() == options::OPT_gz) { - CmdArgs.push_back("-compress-debug-sections"); + CmdArgs.push_back("--compress-debug-sections"); } else { StringRef Value = A->getValue(); - if (Value == "none") { - CmdArgs.push_back("-compress-debug-sections=none"); - } else if (Value == "zlib" || Value == "zlib-gnu") { + if (Value == "none" || Value == "zlib" || Value == "zlib-gnu") { CmdArgs.push_back( - Args.MakeArgString("-compress-debug-sections=" + Twine(Value))); + Args.MakeArgString("--compress-debug-sections=" + Twine(Value))); } else { D.Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName() << Value; Modified: cfe/trunk/test/Driver/compress-noias.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/compress-noias.c?rev=360495&r1=360494&r2=360495&view=diff ============================================================================== --- cfe/trunk/test/Driver/compress-noias.c (original) +++ cfe/trunk/test/Driver/compress-noias.c Fri May 10 18:14:50 2019 @@ -17,19 +17,19 @@ // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ %s // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ %s -// CHECK-OPT_GZ: "-compress-debug-sections" +// CHECK-OPT_GZ: "--compress-debug-sections" // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=none -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=none -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s -// CHECK-OPT_GZ_EQ_NONE: "-compress-debug-sections=none" +// CHECK-OPT_GZ_EQ_NONE: "--compress-debug-sections=none" // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=zlib -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=zlib -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s -// CHECK-OPT_GZ_EQ_ZLIB: "-compress-debug-sections=zlib" +// CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib" // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=zlib-gnu -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB_GNU %s // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=zlib-gnu -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB_GNU %s -// CHECK-OPT_GZ_EQ_ZLIB_GNU: "-compress-debug-sections=zlib-gnu" +// CHECK-OPT_GZ_EQ_ZLIB_GNU: "--compress-debug-sections=zlib-gnu" // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s Modified: cfe/trunk/test/Driver/compress.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/compress.c?rev=360495&r1=360494&r2=360495&view=diff ============================================================================== --- cfe/trunk/test/Driver/compress.c (original) +++ cfe/trunk/test/Driver/compress.c Fri May 10 18:14:50 2019 @@ -16,19 +16,19 @@ // RUN: %clang -### -fintegrated-as -gz -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ %s // RUN: %clang -### -fintegrated-as -gz -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ %s -// CHECK-OPT_GZ: "-compress-debug-sections" +// CHECK-OPT_GZ: "--compress-debug-sections" // RUN: %clang -### -fintegrated-as -gz=none -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s // RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s -// CHECK-OPT_GZ_EQ_NONE: "-compress-debug-sections=none" +// CHECK-OPT_GZ_EQ_NONE: "--compress-debug-sections=none" // RUN: %clang -### -fintegrated-as -gz=zlib -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s // RUN: %clang -### -fintegrated-as -gz=zlib -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s -// CHECK-OPT_GZ_EQ_ZLIB: "-compress-debug-sections=zlib" +// CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib" // RUN: %clang -### -fintegrated-as -gz=zlib-gnu -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB_GNU %s // RUN: %clang -### -fintegrated-as -gz=zlib-gnu -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB_GNU %s -// CHECK-OPT_GZ_EQ_ZLIB_GNU: "-compress-debug-sections=zlib-gnu" +// CHECK-OPT_GZ_EQ_ZLIB_GNU: "--compress-debug-sections=zlib-gnu" // RUN: %clang -### -fintegrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s // RUN: %clang -### -fintegrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits