brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 431105b Raw
64 lines · cpp
1// Android, Cygwin and OpenBSD use emutls by default.2// Clang should pass -femulated-tls to cc1 if they are used,3// and cc1 should set up EmulatedTLS to LLVM CodeGen.4//5// RUN: %clang -### --target=arm-linux-androideabi %s 2>&1 \6// RUN:   | FileCheck -check-prefix=EMU %s7// RUN: %clang -### --target=arm-linux-gnu %s 2>&1 \8// RUN:   | FileCheck -check-prefix=NOEMU %s9// RUN: %clang -### --target=i686-pc-cygwin %s 2>&1 \10// RUN:   | FileCheck -check-prefix=EMU %s11// RUN: %clang -### --target=x86_64-pc-cygwin %s 2>&1 \12// RUN:   | FileCheck -check-prefix=EMU %s13// RUN: %clang -### --target=i686-pc-openbsd %s 2>&1 \14// RUN:   | FileCheck -check-prefix=EMU %s15 16// RUN: %clang -### -target arm-linux-androideabi -fno-emulated-tls -femulated-tls %s 2>&1 \17// RUN: | FileCheck -check-prefix=EMU %s18// RUN: %clang -### -target arm-linux-gnu %s -fno-emulated-tls -femulated-tls 2>&1 \19// RUN: | FileCheck -check-prefix=EMU %s20// RUN: %clang -### -target i686-pc-cygwin %s -fno-emulated-tls -femulated-tls 2>&1 \21// RUN: | FileCheck -check-prefix=EMU %s22// RUN: %clang -### -target x86_64-pc-cygwin %s -fno-emulated-tls -femulated-tls 2>&1 \23// RUN: | FileCheck -check-prefix=EMU %s24// RUN: %clang -### -target i686-pc-openbsd %s -fno-emulated-tls -femulated-tls 2>&1 \25// RUN: | FileCheck -check-prefix=EMU %s26 27// RUN: %clang -### -target arm-linux-androideabi -femulated-tls -fno-emulated-tls %s 2>&1 \28// RUN: | FileCheck -check-prefix=NOEMU %s29// RUN: %clang -### -target arm-linux-gnu %s -femulated-tls -fno-emulated-tls 2>&1 \30// RUN: | FileCheck -check-prefix=NOEMU %s31// RUN: %clang -### -target i686-pc-cygwin %s -femulated-tls -fno-emulated-tls 2>&1 \32// RUN: | FileCheck -check-prefix=NOEMU %s33// RUN: %clang -### -target x86_64-pc-cygwin %s -femulated-tls -fno-emulated-tls 2>&1 \34// RUN: | FileCheck -check-prefix=NOEMU %s35// RUN: %clang -### -target i686-pc-openbsd %s -femulated-tls -fno-emulated-tls 2>&1 \36// RUN: | FileCheck -check-prefix=NOEMU %s37 38// Test that when lto is used any -emualted-tls flags are passed to the linker39// LINUX and Android have different defaults for EmulatedTLS40// RUN: %clang -### -flto --target=riscv64-linux -fno-emulated-tls %s 2>&1 \41// RUN: | FileCheck %s --check-prefix=LTO_NOEMUTLS42// RUN: %clang -### -flto --target=riscv64-linux-android10000 -femulated-tls %s 2>&1 \43// RUN: | FileCheck %s --check-prefix=LTO_EMUTLS44// RUN: %clang -### -flto --target=riscv64-linux -femulated-tls %s 2>&1 \45// RUN: | FileCheck %s --check-prefix=LTO_EMUTLS46// RUN: %clang -### -flto --target=riscv64-linux-android10000 -fno-emulated-tls %s 2>&1 \47// RUN: | FileCheck %s --check-prefix=LTO_NOEMUTLS48// RUN: %clang -### -flto --target=amd64-unknown-openbsd %s 2>&1 \49// RUN: | FileCheck %s --check-prefix=LTO_EMUTLS50 51// Default without -f[no-]emulated-tls, will be decided by the target triple.52// DEFAULT-NOT: "-cc1" {{.*}}"-femulated-tls"53 54// EMU:      "-cc1"55// EMU-SAME: "-femulated-tls"56 57// NOEMU:     "-cc1"58// NOEMU-NOT: "-femulated-tls"59 60// LTO related checks61// LTO_NOEMUTLS-NOT: "-plugin-opt=-emulated-tls"62 63// LTO_EMUTLS: "-plugin-opt=-emulated-tls"64