1 // A test for the propagation of the -mmcu option to -cc1 and -cc1as
2 
3 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=attiny11 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK0 %s
4 // CHECK0: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "attiny11"
5 // CHECK0: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "attiny11"
6 
7 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=at90s2313 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
8 // CHECK1: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "at90s2313"
9 // CHECK1: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "at90s2313"
10 
11 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=at90s8515 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
12 // CHECK2: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "at90s8515"
13 // CHECK2: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "at90s8515"
14 
15 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=attiny13a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
16 // CHECK3: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "attiny13a"
17 // CHECK3: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "attiny13a"
18 
19 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
20 // CHECK4: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "attiny88"
21 // CHECK4: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "attiny88"
22 
23 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
24 // CHECK5: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "attiny88"
25 // CHECK5: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "attiny88"
26 
27 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK6 %s
28 // CHECK6: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega8u2"
29 // CHECK6: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega8u2"
30 
31 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK7 %s
32 // CHECK7: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega8u2"
33 // CHECK7: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega8u2"
34 
35 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
36 // CHECK8: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega8a"
37 // CHECK8: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega8a"
38 
39 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK9 %s
40 // CHECK9: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega8a"
41 // CHECK9: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega8a"
42 
43 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKa %s
44 // CHECKa: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega16a"
45 // CHECKa: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega16a"
46 
47 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKb %s
48 // CHECKb: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega16a"
49 // CHECKb: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega16a"
50 
51 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega128a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKc %s
52 // CHECKc: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega128a"
53 // CHECKc: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega128a"
54 
55 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atmega2560 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKd %s
56 // CHECKd: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega2560"
57 // CHECKd: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega2560"
58 
59 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=attiny10 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKe %s
60 // CHECKe: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "attiny10"
61 // CHECKe: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "attiny10"
62 
63 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atxmega16a4 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKf %s
64 // CHECKf: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atxmega16a4"
65 // CHECKf: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atxmega16a4"
66 
67 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atxmega64b1 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKg %s
68 // CHECKg: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atxmega64b1"
69 // CHECKg: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atxmega64b1"
70 
71 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atxmega64a1u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKh %s
72 // CHECKh: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atxmega64a1u"
73 // CHECKh: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atxmega64a1u"
74 
75 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atxmega128a3u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKj %s
76 // CHECKj: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atxmega128a3u"
77 // CHECKj: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atxmega128a3u"
78 
79 // RUN: %clang -### -target avr -no-canonical-prefixes -mmcu=atxmega128a4u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKi %s
80 // CHECKi: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atxmega128a4u"
81 // CHECKi: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atxmega128a4u"
82