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