Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -1677,7 +1677,8 @@ // aliases for options that are spelled using the more common Unix / GNU flag // style of double-dash and equals-joined flags. def gcc_toolchain_legacy_spelling : Separate<["-"], "gcc-toolchain">, Alias; -def target_legacy_spelling : Separate<["-"], "target">, Alias; +def target_legacy_spelling : Separate<["-", "--"], "target">, Alias; +def target_legacy_spelling_EQ : Joined<["-"], "target=">, Alias; // Special internal option to handle -Xlinker --no-demangle. def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">, Index: test/Driver/target.c =================================================================== --- test/Driver/target.c +++ test/Driver/target.c @@ -7,3 +7,9 @@ // Also check that the legacy spelling works. // RUN: %clang -no-canonical-prefixes -target unknown-unknown-unknown -c %s \ // RUN: -o %t.o -### 2>&1 | FileCheck %s +// +// RUN: %clang -no-canonical-prefixes -target=unknown-unknown-unknown -c %s \ +// RUN: -o %t.o -### 2>&1 | FileCheck %s +// +// RUN: %clang -no-canonical-prefixes --target unknown-unknown-unknown -c %s \ +// RUN: -o %t.o -### 2>&1 | FileCheck %s