Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -2107,6 +2107,9 @@ TakeNextArg = true; } else if (Value.startswith("-gdwarf-")) { CmdArgs.push_back(Value.data()); + } else if (Value == "-target-feature") { + CmdArgs.push_back("-target-feature"); + TakeNextArg = true; } else { D.Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName() << Value; Index: test/Driver/integrated-as.s =================================================================== --- test/Driver/integrated-as.s +++ test/Driver/integrated-as.s @@ -43,3 +43,9 @@ // RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s // DWARF2WA: "-gdwarf-2" + +// RUN: %clang -### -c -integrated-as %s -Xassembler -target-feature -Xassembler -mp 2>&1 \ +// RUN: | FileCheck --check-prefix=TARGET_FEATURE1 %s +// RUN: %clang -### -c -integrated-as %s -Wa,-target-feature,-mp 2>&1 | FileCheck --check-prefix=TARGET_FEATURE1 %s +// TARGET_FEATURE1: "-target-feature" +// TARGET_FEATURE1: "-mp"