aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/lto-jobs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/lto-jobs.c')
-rw-r--r--test/Driver/lto-jobs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Driver/lto-jobs.c b/test/Driver/lto-jobs.c
new file mode 100644
index 000000000000..539867713b07
--- /dev/null
+++ b/test/Driver/lto-jobs.c
@@ -0,0 +1,11 @@
+// Confirm that -flto-jobs=N is passed to linker
+
+// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS-ACTION < %t %s
+//
+// CHECK-LINK-THIN-JOBS-ACTION: "-plugin-opt=jobs=5"
+
+// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS2-ACTION < %t %s
+//
+// CHECK-LINK-THIN-JOBS2-ACTION: "-mllvm" "-threads=5"