brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 28638f6 Raw
39 lines · c
1// Verify only one of codegen-data flag is passed.2// RUN: not %clang -### -S --target=aarch64-linux-gnu -fcodegen-data-generate -fcodegen-data-use %s 2>&1 | FileCheck %s --check-prefix=CONFLICT3// RUN: not %clang -### -S --target=arm64-apple-darwin  -fcodegen-data-generate -fcodegen-data-use %s 2>&1 | FileCheck %s --check-prefix=CONFLICT4// CONFLICT: error: invalid argument '-fcodegen-data-generate' not allowed with '-fcodegen-data-use'5 6// Verify the codegen-data-generate (boolean) flag is passed to LLVM7// RUN: %clang -### -S --target=aarch64-linux-gnu -fcodegen-data-generate %s  2>&1| FileCheck %s --check-prefix=GENERATE8// RUN: %clang -### -S --target=arm64-apple-darwin -fcodegen-data-generate %s 2>&1| FileCheck %s --check-prefix=GENERATE9// GENERATE: "-mllvm" "-codegen-data-generate"10 11// Verify the codegen-data-use-path flag (with a default value) is passed to LLVM.12// RUN: %clang -### -S --target=aarch64-linux-gnu -fcodegen-data-use %s 2>&1| FileCheck %s --check-prefix=USE13// RUN: %clang -### -S --target=arm64-apple-darwin -fcodegen-data-use %s 2>&1| FileCheck %s --check-prefix=USE14// RUN: %clang -### -S --target=aarch64-linux-gnu -fcodegen-data-use=file %s 2>&1 | FileCheck %s --check-prefix=USE-FILE15// RUN: %clang -### -S --target=arm64-apple-darwin -fcodegen-data-use=file %s 2>&1 | FileCheck %s --check-prefix=USE-FILE16// USE: "-mllvm" "-codegen-data-use-path=default.cgdata"17// USE-FILE: "-mllvm" "-codegen-data-use-path=file"18 19// Verify the codegen-data-generate (boolean) flag with a LTO.20// RUN: %clang -### -flto --target=aarch64-linux-gnu -fcodegen-data-generate %s 2>&1 | FileCheck %s --check-prefix=GENERATE-LTO21// GENERATE-LTO: {{ld(.exe)?"}}22// GENERATE-LTO-SAME: "-plugin-opt=-codegen-data-generate"23// RUN: %clang -### -flto --target=arm64-apple-darwin -fcodegen-data-generate %s 2>&1 | FileCheck %s --check-prefix=GENERATE-LTO-DARWIN24// GENERATE-LTO-DARWIN: {{ld(.exe)?"}}25// GENERATE-LTO-DARWIN-SAME: "-mllvm" "-codegen-data-generate"26 27// Verify the codegen-data-use-path flag with a LTO is passed to LLVM.28// RUN: %clang -### -flto=thin --target=aarch64-linux-gnu -fcodegen-data-use %s 2>&1 | FileCheck %s --check-prefix=USE-LTO29// USE-LTO: {{ld(.exe)?"}}30// USE-LTO-SAME: "-plugin-opt=-codegen-data-use-path=default.cgdata"31// RUN: %clang -### -flto=thin --target=arm64-apple-darwin -fcodegen-data-use %s 2>&1 | FileCheck %s --check-prefix=USE-LTO-DARWIN32// USE-LTO-DARWIN: {{ld(.exe)?"}}33// USE-LTO-DARWIN-SAME: "-mllvm" "-codegen-data-use-path=default.cgdata"34 35// For now, LLD MachO supports for generating the codegen data at link time.36// RUN: %clang -### -fuse-ld=lld -B%S/Inputs/lld --target=arm64-apple-darwin -fcodegen-data-generate %s 2>&1 | FileCheck %s --check-prefix=GENERATE-LLD-DARWIN37// GENERATE-LLD-DARWIN: {{ld(.exe)?"}}38// GENERATE-LLD-DARWIN-SAME: "--codegen-data-generate-path=default.cgdata"39