This revision was automatically updated to reflect the committed changes. Closed by commit rL348515: Allow forwarding -fdebug-compilation-dir to cc1as (authored by nico, committed by ). Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D55377?vs=177004&id=177015#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55377/new/ https://reviews.llvm.org/D55377 Files: cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/test/Driver/integrated-as.s Index: cfe/trunk/test/Driver/integrated-as.s =================================================================== --- cfe/trunk/test/Driver/integrated-as.s +++ cfe/trunk/test/Driver/integrated-as.s @@ -50,3 +50,9 @@ // RUN: %clang -### -target x86_64--- -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s // PIC: "-mrelocation-model" "pic" + +// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s +// WA_DEBUGDIR: "-fdebug-compilation-dir" "." + +// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir -Xassembler . 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s +// XA_DEBUGDIR: "-fdebug-compilation-dir" "." Index: cfe/trunk/lib/Driver/ToolChains/Clang.cpp =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp @@ -2152,6 +2152,9 @@ } CmdArgs.push_back(Value.data()); TakeNextArg = true; + } else if (Value == "-fdebug-compilation-dir") { + CmdArgs.push_back("-fdebug-compilation-dir"); + TakeNextArg = true; } else { D.Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName() << Value;
Index: cfe/trunk/test/Driver/integrated-as.s =================================================================== --- cfe/trunk/test/Driver/integrated-as.s +++ cfe/trunk/test/Driver/integrated-as.s @@ -50,3 +50,9 @@ // RUN: %clang -### -target x86_64--- -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s // PIC: "-mrelocation-model" "pic" + +// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s +// WA_DEBUGDIR: "-fdebug-compilation-dir" "." + +// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir -Xassembler . 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s +// XA_DEBUGDIR: "-fdebug-compilation-dir" "." Index: cfe/trunk/lib/Driver/ToolChains/Clang.cpp =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp @@ -2152,6 +2152,9 @@ } CmdArgs.push_back(Value.data()); TakeNextArg = true; + } else if (Value == "-fdebug-compilation-dir") { + CmdArgs.push_back("-fdebug-compilation-dir"); + TakeNextArg = true; } else { D.Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName() << Value;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits