1f4a2713aSLionel Sambuc // Check that we extract --no-demangle from '-Xlinker' and '-Wl,', since that 2f4a2713aSLionel Sambuc // was a collect2 argument. 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc // RUN: %clang -target i386-apple-darwin9 -### \ 5f4a2713aSLionel Sambuc // RUN: -Xlinker one -Xlinker --no-demangle \ 6*0a6a1f1dSLionel Sambuc // RUN: -Wl,two,--no-demangle,three -Xlinker four -z five %s 2> %t 7f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=DARWIN < %t %s 8f4a2713aSLionel Sambuc // 9f4a2713aSLionel Sambuc // RUN: %clang -target x86_64-pc-linux-gnu -### \ 10f4a2713aSLionel Sambuc // RUN: -Xlinker one -Xlinker --no-demangle \ 11*0a6a1f1dSLionel Sambuc // RUN: -Wl,two,--no-demangle,three -Xlinker four -z five %s 2> %t 12f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=LINUX < %t %s 13f4a2713aSLionel Sambuc // 14f4a2713aSLionel Sambuc // DARWIN-NOT: --no-demangle 15*0a6a1f1dSLionel Sambuc // DARWIN: "one" "two" "three" "four" "-z" "five" 16*0a6a1f1dSLionel Sambuc // LINUX: "--no-demangle" "one" "two" "three" "four" "-z" "five" 17f4a2713aSLionel Sambuc 18f4a2713aSLionel Sambuc // Check that we forward '-Xlinker' and '-Wl,' on Windows. 19f4a2713aSLionel Sambuc // RUN: %clang -target i686-pc-win32 -### \ 20f4a2713aSLionel Sambuc // RUN: -Xlinker one -Wl,two %s 2>&1 | \ 21f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=WIN %s 22f4a2713aSLionel Sambuc // WIN: link.exe 23f4a2713aSLionel Sambuc // WIN: "one" 24f4a2713aSLionel Sambuc // WIN: "two" 25