1 // Test handling of -f(no-)function-sections and -f(no-)data-sections 2 // 3 // CHECK-FS: -ffunction-sections 4 // CHECK-NOFS-NOT: -ffunction-sections 5 // CHECK-DS: -fdata-sections 6 // CHECK-NODS-NOT: -fdata-sections 7 8 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 9 // RUN: -target i386-unknown-linux \ 10 // RUN: | FileCheck --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS %s 11 12 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 13 // RUN: -target i386-unknown-linux \ 14 // RUN: -ffunction-sections \ 15 // RUN: | FileCheck --check-prefix=CHECK-FS %s 16 17 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 18 // RUN: -target i386-unknown-linux \ 19 // RUN: -fno-function-sections \ 20 // RUN: | FileCheck --check-prefix=CHECK-NOFS %s 21 22 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 23 // RUN: -target i386-unknown-linux \ 24 // RUN: -ffunction-sections -fno-function-sections \ 25 // RUN: | FileCheck --check-prefix=CHECK-NOFS %s 26 27 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 28 // RUN: -target i386-unknown-linux \ 29 // RUN: -fno-function-sections -ffunction-sections \ 30 // RUN: | FileCheck --check-prefix=CHECK-FS %s 31 32 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 33 // RUN: -target i386-unknown-linux \ 34 // RUN: -ffunction-sections -fno-function-sections -ffunction-sections \ 35 // RUN: | FileCheck --check-prefix=CHECK-FS %s 36 37 38 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 39 // RUN: -target i386-unknown-linux \ 40 // RUN: -fdata-sections \ 41 // RUN: | FileCheck --check-prefix=CHECK-DS %s 42 43 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 44 // RUN: -target i386-unknown-linux \ 45 // RUN: -fno-data-sections \ 46 // RUN: | FileCheck --check-prefix=CHECK-NODS %s 47 48 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 49 // RUN: -target i386-unknown-linux \ 50 // RUN: -fdata-sections -fno-data-sections \ 51 // RUN: | FileCheck --check-prefix=CHECK-NODS %s 52 53 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 54 // RUN: -target i386-unknown-linux \ 55 // RUN: -fno-data-sections -fdata-sections \ 56 // RUN: | FileCheck --check-prefix=CHECK-DS %s 57 58 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ 59 // RUN: -target i386-unknown-linux \ 60 // RUN: -fdata-sections -fno-data-sections -fdata-sections \ 61 // RUN: | FileCheck --check-prefix=CHECK-DS %s 62 63