1 // Check that we emit warnings for using unversioned Android target directories
4 // RUN: mkdir -p %t/bin
5 // RUN: mkdir -p %t/include/aarch64-none-linux-android/c++/v1
6 // RUN: mkdir -p %t/include/aarch64-none-linux-android23/c++/v1
7 // RUN: mkdir -p %t/include/c++/v1
8 // RUN: mkdir -p %t/lib/aarch64-none-linux-android
9 // RUN: mkdir -p %t/lib/aarch64-none-linux-android23
10 // RUN: mkdir -p %t/resource/lib/aarch64-none-linux-android
11 // RUN: mkdir -p %t/resource/lib/aarch64-none-linux-android23
13 // Using an unversioned directory for an unversioned triple isn't a warning.
14 // RUN: %clang --target=aarch64-none-linux-android -ccc-install-dir %t/bin \
15 // RUN: -resource-dir %t/resource -### -c %s 2>&1 | \
16 // RUN: FileCheck --check-prefix=NO-WARNING %s
17 // NO-WARNING-NOT: using unversioned Android target directory
19 // RUN: %clang --target=aarch64-none-linux-android21 -ccc-install-dir %t/bin \
20 // RUN: -resource-dir %t/resource -### -c %s 2>&1 | \
21 // RUN: FileCheck --check-prefix=ANDROID21 -DDIR=%t -DSEP=%{fs-sep} %s
22 // ANDROID21-DAG: using unversioned Android target directory [[DIR]]/bin[[SEP]]..[[SEP]]include[[SEP]]aarch64-none-linux-android
23 // ANDROID21-DAG: using unversioned Android target directory [[DIR]]/bin[[SEP]]..[[SEP]]lib[[SEP]]aarch64-none-linux-android
24 // ANDROID21-DAG: using unversioned Android target directory [[DIR]]/resource[[SEP]]lib[[SEP]]aarch64-none-linux-android
26 // 23 or newer should use the versioned directory
27 // RUN: %clang --target=aarch64-none-linux-android23 -ccc-install-dir %t/bin \
28 // RUN: -resource-dir %t/resource -### -c %s 2>&1 | \
29 // RUN: FileCheck --check-prefix=NO-WARNING %s
31 // RUN: %clang --target=aarch64-none-linux-android28 -ccc-install-dir %t/bin \
32 // RUN: -resource-dir %t/resource -### -c %s 2>&1 | \
33 // RUN: FileCheck --check-prefix=NO-WARNING %s