1 // Check that clang is able to process short response files
2 // Since this is a short response file, clang must not use a response file
3 // to pass its parameters to other tools. This is only necessary for a large
4 // number of parameters.
5 // RUN: echo "-DTEST" > %t.0.txt
6 // RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT
7 // SHORT-NOT: Arguments passed via response file
8 // SHORT: extern int it_works;
9 
10 // Check that clang is able to process long response files, routing a long
11 // sequence of arguments to other tools by using response files as well.
12 // We generate a 2MB response file to attempt to surpass any system limit.
13 // But there's no guarantee that we actually will (the system limit could be
14 // *huge*), so just check that invoking cc1 succeeds under these conditions.
15 //
16 // RUN: %clang -E %S/Inputs/gen-response.c | grep DTEST > %t.1.txt
17 // RUN: %clang -E @%t.1.txt %s -v 2>&1 | FileCheck %s -check-prefix=LONG
18 // LONG: extern int it_works;
19 
20 #ifdef TEST
21 extern int it_works;
22 #endif
23