23 lines · c
1// Check that clang is able to process short response files2// Since this is a short response file, clang must not use a response file3// to pass its parameters to other tools. This is only necessary for a large4// number of parameters.5// RUN: echo "-DTEST" > %t.0.txt6// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT7// SHORT-NOT: Arguments passed via response file8// SHORT: extern int it_works;9 10// Check that clang is able to process long response files, routing a long11// 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 be14// *huge*), so just check that invoking cc1 succeeds under these conditions.15//16// RUN: %python -c 'print(*("-DTEST" for x in range(300000)))' >%t.1.txt17// RUN: %clang -E @%t.1.txt %s -v 2>&1 | FileCheck %s -check-prefix=LONG18// LONG: extern int it_works;19 20#ifdef TEST21extern int it_works;22#endif23