2016-02-25 05:49:26 +08:00
|
|
|
// RUN: rm -f "%t.d" "%t1.s" "%t2.s" "%t3.s" "%t4.s" "%t5.s"
|
|
|
|
//
|
2013-01-29 04:51:27 +08:00
|
|
|
// RUN: touch %t.s
|
|
|
|
// RUN: not %clang -S -DCRASH -o %t.s -MMD -MF %t.d %s
|
|
|
|
// RUN: test ! -f %t.s
|
2011-11-21 08:01:05 +08:00
|
|
|
// RUN: test ! -f %t.d
|
|
|
|
|
2013-01-29 04:51:27 +08:00
|
|
|
// RUN: touch %t.s
|
|
|
|
// RUN: not %clang -S -DMISSING -o %t.s -MMD -MF %t.d %s
|
|
|
|
// RUN: test ! -f %t.s
|
2011-11-21 08:01:14 +08:00
|
|
|
// RUN: test ! -f %t.d
|
|
|
|
|
2013-01-29 04:51:27 +08:00
|
|
|
// RUN: touch %t.s
|
|
|
|
// RUN: not %clang -S -o %t.s -MMD -MF %t.d %s
|
|
|
|
// RUN: test ! -f %t.s
|
2011-11-21 08:01:05 +08:00
|
|
|
// RUN: test -f %t.d
|
|
|
|
|
|
|
|
// REQUIRES: crash-recovery
|
|
|
|
|
|
|
|
#ifdef CRASH
|
|
|
|
#pragma clang __debug crash
|
2011-11-21 08:01:14 +08:00
|
|
|
#elif defined(MISSING)
|
|
|
|
#include "nonexistent.h"
|
2011-11-21 08:01:05 +08:00
|
|
|
#else
|
|
|
|
invalid C code
|
|
|
|
#endif
|
2013-01-25 03:14:47 +08:00
|
|
|
|
|
|
|
// RUN: touch %t1.c
|
|
|
|
// RUN: echo "invalid C code" > %t2.c
|
2013-01-29 04:51:27 +08:00
|
|
|
// RUN: cd %T && not %clang -S %t1.c %t2.c
|
|
|
|
// RUN: test -f %t1.s
|
|
|
|
// RUN: test ! -f %t2.s
|
2013-01-25 03:14:47 +08:00
|
|
|
|
|
|
|
// RUN: touch %t1.c
|
|
|
|
// RUN: touch %t2.c
|
|
|
|
// RUN: chmod -r %t2.c
|
2013-01-29 04:51:27 +08:00
|
|
|
// RUN: cd %T && not %clang -S %t1.c %t2.c
|
|
|
|
// RUN: test -f %t1.s
|
|
|
|
// RUN: test ! -f %t2.s
|
2013-01-30 04:15:05 +08:00
|
|
|
|
Bail on compilation as soon as a job fails.
Summary:
(Re-land of r260448, which was reverted in r260522 due to a test failure
in Driver/output-file-cleanup.c that only showed up in fresh builds.)
Previously we attempted to be smart; if one job failed, we'd run all
jobs that didn't depend on the failing job.
Problem is, this doesn't work well for e.g. CUDA compilation without
-save-temps. In this case, the device-side and host-side Assemble
actions (which actually are responsible for preprocess, compile,
backend, and assemble, since we're not saving temps) are necessarily
distinct. So our clever heuristic doesn't help us, and we repeat every
error message once for host and once for each device arch.
The main effect of this change, other than fixing CUDA, is that if you
pass multiple cc files to one instance of clang and you get a compile
error, we'll stop when the first cc1 job fails.
Reviewers: echristo
Subscribers: cfe-commits, jhen, echristo, tra, rafael
Differential Revision: http://reviews.llvm.org/D17217
llvm-svn: 261774
2016-02-25 05:49:28 +08:00
|
|
|
// When given multiple .c files to compile, clang compiles them in order until
|
|
|
|
// it hits an error, at which point it stops.
|
|
|
|
//
|
2013-01-30 04:15:05 +08:00
|
|
|
// RUN: touch %t1.c
|
|
|
|
// RUN: echo "invalid C code" > %t2.c
|
|
|
|
// RUN: touch %t3.c
|
|
|
|
// RUN: echo "invalid C code" > %t4.c
|
|
|
|
// RUN: touch %t5.c
|
|
|
|
// RUN: cd %T && not %clang -S %t1.c %t2.c %t3.c %t4.c %t5.c
|
|
|
|
// RUN: test -f %t1.s
|
|
|
|
// RUN: test ! -f %t2.s
|
Bail on compilation as soon as a job fails.
Summary:
(Re-land of r260448, which was reverted in r260522 due to a test failure
in Driver/output-file-cleanup.c that only showed up in fresh builds.)
Previously we attempted to be smart; if one job failed, we'd run all
jobs that didn't depend on the failing job.
Problem is, this doesn't work well for e.g. CUDA compilation without
-save-temps. In this case, the device-side and host-side Assemble
actions (which actually are responsible for preprocess, compile,
backend, and assemble, since we're not saving temps) are necessarily
distinct. So our clever heuristic doesn't help us, and we repeat every
error message once for host and once for each device arch.
The main effect of this change, other than fixing CUDA, is that if you
pass multiple cc files to one instance of clang and you get a compile
error, we'll stop when the first cc1 job fails.
Reviewers: echristo
Subscribers: cfe-commits, jhen, echristo, tra, rafael
Differential Revision: http://reviews.llvm.org/D17217
llvm-svn: 261774
2016-02-25 05:49:28 +08:00
|
|
|
// RUN: test ! -f %t3.s
|
2013-01-30 04:15:05 +08:00
|
|
|
// RUN: test ! -f %t4.s
|
Bail on compilation as soon as a job fails.
Summary:
(Re-land of r260448, which was reverted in r260522 due to a test failure
in Driver/output-file-cleanup.c that only showed up in fresh builds.)
Previously we attempted to be smart; if one job failed, we'd run all
jobs that didn't depend on the failing job.
Problem is, this doesn't work well for e.g. CUDA compilation without
-save-temps. In this case, the device-side and host-side Assemble
actions (which actually are responsible for preprocess, compile,
backend, and assemble, since we're not saving temps) are necessarily
distinct. So our clever heuristic doesn't help us, and we repeat every
error message once for host and once for each device arch.
The main effect of this change, other than fixing CUDA, is that if you
pass multiple cc files to one instance of clang and you get a compile
error, we'll stop when the first cc1 job fails.
Reviewers: echristo
Subscribers: cfe-commits, jhen, echristo, tra, rafael
Differential Revision: http://reviews.llvm.org/D17217
llvm-svn: 261774
2016-02-25 05:49:28 +08:00
|
|
|
// RUN: test ! -f %t5.s
|