annotate clang/test/Driver/response-file.c @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 2e18cbf3894f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Check that clang is able to process short response files
anatofuz
parents:
diff changeset
2 // Since this is a short response file, clang must not use a response file
anatofuz
parents:
diff changeset
3 // to pass its parameters to other tools. This is only necessary for a large
anatofuz
parents:
diff changeset
4 // number of parameters.
anatofuz
parents:
diff changeset
5 // RUN: echo "-DTEST" > %t.0.txt
anatofuz
parents:
diff changeset
6 // RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT
anatofuz
parents:
diff changeset
7 // SHORT-NOT: Arguments passed via response file
anatofuz
parents:
diff changeset
8 // SHORT: extern int it_works;
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 // Check that clang is able to process long response files, routing a long
anatofuz
parents:
diff changeset
11 // sequence of arguments to other tools by using response files as well.
anatofuz
parents:
diff changeset
12 // We generate a 2MB response file to attempt to surpass any system limit.
anatofuz
parents:
diff changeset
13 // But there's no guarantee that we actually will (the system limit could be
anatofuz
parents:
diff changeset
14 // *huge*), so just check that invoking cc1 succeeds under these conditions.
anatofuz
parents:
diff changeset
15 //
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
16 // RUN: %python -c 'print(*("-DTEST" for x in range(300000)))' >%t.1.txt
150
anatofuz
parents:
diff changeset
17 // RUN: %clang -E @%t.1.txt %s -v 2>&1 | FileCheck %s -check-prefix=LONG
anatofuz
parents:
diff changeset
18 // LONG: extern int it_works;
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 #ifdef TEST
anatofuz
parents:
diff changeset
21 extern int it_works;
anatofuz
parents:
diff changeset
22 #endif