--- /dev/null
+// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" clang -### 2> %t &&
+// RUN: grep -F 'Option 0 - Name: "-v", Values: {}' %t &&
+// RUN: grep -F 'Option 1 - Name: "-###", Values: {}' %t
--- /dev/null
+// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log &&
+// RUN: grep 'clang-cc" "-triple" "x86_64-pc-dragonfly"' %t.log &&
+// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
+// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: true
+
--- /dev/null
+// RUN: clang -ccc-clang-archs "" -ccc-host-triple ppc64-pc-freebsd8 %s -### 2> %t.log &&
+// RUN: cat %t.log &&
+// RUN: grep 'clang-cc" "-triple" "powerpc64-pc-freebsd8"' %t.log &&
+// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
+// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: true
+
--- /dev/null
+// RUN: clang --help &&
+// RUN: clang --help-hidden &&
+// RUN: clang -dumpversion &&
+// RUN: clang -print-search-dirs &&
+// RUN: true