brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 4d206ad Raw
96 lines · c
1// Test handling of -f(no-)function-sections and -f(no-)data-sections2//3// CHECK-FS: -ffunction-sections4// CHECK-NOFS-NOT: -ffunction-sections5// CHECK-DS: -fdata-sections6// CHECK-NODS-NOT: -fdata-sections7// CHECK-US-NOT: -fno-unique-section-names8// CHECK-NOUS: -fno-unique-section-names9// CHECK-PLUGIN-DEFAULT-NOT: "-plugin-opt=-function-sections10// CHECK-PLUGIN-DEFAULT-NOT: "-plugin-opt=-data-sections11// CHECK-PLUGIN-SECTIONS: "-plugin-opt=-function-sections=1"12// CHECK-PLUGIN-SECTIONS: "-plugin-opt=-data-sections=1"13// CHECK-PLUGIN-NO-SECTIONS: "-plugin-opt=-function-sections=0"14// CHECK-PLUGIN-NO-SECTIONS: "-plugin-opt=-data-sections=0"15 16// RUN: %clang -### %s -fsyntax-only 2>&1       \17// RUN:     --target=i386-unknown-linux \18// RUN:   | FileCheck --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS %s19 20// RUN: %clang -### %s -fsyntax-only 2>&1       \21// RUN:     --target=i386-unknown-linux \22// RUN:     -ffunction-sections \23// RUN:   | FileCheck --check-prefix=CHECK-FS %s24 25// RUN: %clang -### %s -fsyntax-only 2>&1       \26// RUN:     --target=i386-unknown-linux \27// RUN:     -fno-function-sections \28// RUN:   | FileCheck --check-prefix=CHECK-NOFS %s29 30// RUN: %clang -### %s -fsyntax-only 2>&1       \31// RUN:     --target=i386-unknown-linux \32// RUN:     -ffunction-sections -fno-function-sections \33// RUN:   | FileCheck --check-prefix=CHECK-NOFS %s34 35// RUN: %clang -### %s -fsyntax-only 2>&1       \36// RUN:     --target=i386-unknown-linux \37// RUN:     -fno-function-sections -ffunction-sections \38// RUN:   | FileCheck --check-prefix=CHECK-FS %s39 40// RUN: %clang -### %s -fsyntax-only 2>&1       \41// RUN:     --target=i386-unknown-linux \42// RUN:     -ffunction-sections -fno-function-sections -ffunction-sections \43// RUN:   | FileCheck --check-prefix=CHECK-FS %s44 45 46// RUN: %clang -### %s -fsyntax-only 2>&1       \47// RUN:     --target=i386-unknown-linux \48// RUN:     -fdata-sections \49// RUN:   | FileCheck --check-prefix=CHECK-DS %s50 51// RUN: %clang -### %s -fsyntax-only 2>&1       \52// RUN:     --target=i386-unknown-linux \53// RUN:     -fno-data-sections \54// RUN:   | FileCheck --check-prefix=CHECK-NODS %s55 56// RUN: %clang -### %s -fsyntax-only 2>&1       \57// RUN:     --target=i386-unknown-linux \58// RUN:     -fdata-sections -fno-data-sections \59// RUN:   | FileCheck --check-prefix=CHECK-NODS %s60 61// RUN: %clang -### %s -fsyntax-only 2>&1       \62// RUN:     --target=i386-unknown-linux \63// RUN:     -fno-data-sections -fdata-sections \64// RUN:   | FileCheck --check-prefix=CHECK-DS %s65 66// RUN: %clang -### %s -fsyntax-only 2>&1       \67// RUN:     --target=i386-unknown-linux \68// RUN:     -fdata-sections -fno-data-sections -fdata-sections \69// RUN:   | FileCheck --check-prefix=CHECK-DS %s70 71 72// RUN: %clang -### %s -fsyntax-only 2>&1        \73// RUN:     --target=i386-unknown-linux \74// RUN:     -funique-section-names \75// RUN:   | FileCheck --check-prefix=CHECK-US %s76 77// RUN: %clang -### %s -fsyntax-only 2>&1        \78// RUN:     --target=i386-unknown-linux \79// RUN:     -fno-unique-section-names \80// RUN:   | FileCheck --check-prefix=CHECK-NOUS %s81 82 83// RUN: %clang -### %s -flto 2>&1                \84// RUN:     --target=x86_64-unknown-linux \85// RUN:   | FileCheck --check-prefix=CHECK-PLUGIN-DEFAULT %s86 87// RUN: %clang -### %s -flto 2>&1                \88// RUN:     --target=x86_64-unknown-linux \89// RUN:     -ffunction-sections -fdata-sections \90// RUN:   | FileCheck --check-prefix=CHECK-PLUGIN-SECTIONS %s91 92// RUN: %clang -### %s -flto 2>&1                \93// RUN:     --target=x86_64-unknown-linux \94// RUN:     -fno-function-sections -fno-data-sections \95// RUN:   | FileCheck --check-prefix=CHECK-PLUGIN-NO-SECTIONS %s96