]> granicus.if.org Git - clang/commitdiff
Test a few more bits of the driver.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 00:31:11 +0000 (00:31 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 00:31:11 +0000 (00:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70816 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/ccc-add-args.c [new file with mode: 0644]
test/Driver/dragonfly.c [new file with mode: 0644]
test/Driver/freebsd.c [new file with mode: 0644]
test/Driver/immediate-options.c [new file with mode: 0644]

diff --git a/test/Driver/ccc-add-args.c b/test/Driver/ccc-add-args.c
new file mode 100644 (file)
index 0000000..b504b0b
--- /dev/null
@@ -0,0 +1,3 @@
+// 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
diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c
new file mode 100644 (file)
index 0000000..5d7b0b0
--- /dev/null
@@ -0,0 +1,6 @@
+// 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
+
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c
new file mode 100644 (file)
index 0000000..91258d9
--- /dev/null
@@ -0,0 +1,7 @@
+// 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
+
diff --git a/test/Driver/immediate-options.c b/test/Driver/immediate-options.c
new file mode 100644 (file)
index 0000000..34af89f
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: clang --help &&
+// RUN: clang --help-hidden &&
+// RUN: clang -dumpversion &&
+// RUN: clang -print-search-dirs &&
+// RUN: true