1 // Test whether or not the driver instructs the backend to use .init_array 2 // sections for global constructors. 3 // 4 // CHECK-INIT-ARRAY: -fuse-init-array 5 // CHECK-NO-INIT-ARRAY-NOT: -fuse-init-array 6 // 7 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 8 // RUN: -target i386-unknown-linux \ 9 // RUN: --sysroot=%S/Inputs/fake_install_tree \ 10 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 11 // 12 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 13 // RUN: -fno-use-init-array \ 14 // RUN: -target i386-unknown-linux \ 15 // RUN: --sysroot=%S/Inputs/fake_install_tree \ 16 // RUN: | FileCheck --check-prefix=CHECK-NO-INIT-ARRAY %s 17 // 18 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 19 // RUN: -fno-use-init-array -fuse-init-array \ 20 // RUN: -target i386-unknown-linux \ 21 // RUN: --sysroot=%S/Inputs/fake_install_tree \ 22 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 23 // 24 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 25 // RUN: -target i386-unknown-linux \ 26 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 27 // RUN: | FileCheck --check-prefix=CHECK-NO-INIT-ARRAY %s 28 // 29 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 30 // RUN: -fuse-init-array \ 31 // RUN: -target i386-unknown-linux \ 32 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 33 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 34 // 35 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 36 // RUN: -target arm-unknown-linux-androideabi \ 37 // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 38 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 39 // 40 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 41 // RUN: -target mipsel-unknown-linux-android \ 42 // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 43 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 44 // 45 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 46 // RUN: -target i386-unknown-linux-android \ 47 // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 48 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 49 // 50 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 51 // RUN: -target aarch64-none-linux-gnu \ 52 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 53 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 54 // 55 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 56 // RUN: -target aarch64-none-none-eabi \ 57 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 58 59 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 60 // RUN: -target arm64-none-linux-gnu \ 61 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 62 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 63 // 64 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 65 // RUN: -target arm64-none-none-eabi \ 66 // RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s 67