[PATCH] D143692: [clang][driver] Emit error when enabling emulated tls on unsupported architectures
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 9 16:32:22 PST 2023
MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6170
+
+ if (Arg *A = Args.getLastArg(options::OPT_femulated_tls)) {
+ // LLVM does not support Emulated TLS for some architectures, like RISCV
----------------
Use `render` and remove the previous `Args.AddLastArg(CmdArgs, options::OPT_femulated_tls, options::OPT_fno_emulated_tls);`
================
Comment at: clang/test/Driver/emulated-tls.cpp:32
+//
+// RUN: %clang -### -target riscv64-linux-android %s -fno-emulated-tls -femulated-tls 2>&1 \
+// RUN: | FileCheck -check-prefix=RISCV-ERROR %s
----------------
`--target=` for new tests
================
Comment at: clang/test/Driver/emulated-tls.cpp:48
+// RISCV-ERROR: unsupported option '-femulated-tls' for target 'riscv64-unknown-linux-android'
+
----------------
delete trailing blank line
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143692/new/
https://reviews.llvm.org/D143692
More information about the cfe-commits
mailing list