Open Jianghibo opened 2 years ago
-mtls-size=48
is irrelevant. The feature request is about large code model TLS for TLSDESC/Initial-Exec models on AArch64.
% cat a.cc
extern thread_local int x;
int foo() { return x; }
% clang++ --target=aarch64-linux-gnu -mcmodel=large -S -fno-pic a.cc # -fpie and -fpic are similar
fatal error: error in backend: ELF TLS only supported in small memory model or in local exec TLS model
...
Please test the latest release for future bug reports/feature requests.
@llvm/issue-subscribers-backend-aarch64
Does the latest release refer to test-suite or clang?
When I was compiling llvm-test-suite(release/12.x) with
-DCMAKE_C_FLAGS="-mtls-size=48 -mcmodel=large" -DCMAKE_CXX_FLAGS="-mtls-size=48 -mcmodel=large"
, I ran into a error.The error occurred when compiling the following file.
clang++ -DHAVE_POSIX_REGEX -DHAVE_STD_REGEX -DHAVE_STEADY_CLOCK -DNDEBUG -I/home/jianghaibo/llvm-test-suite/MicroBenchmarks/libs/benchmark-1.3.0/include -I/home/jianghaibo/llvm-test-suite/MicroBenchmarks/libs/benchmark-1.3.0/src -I/home/jianghaibo/llvm-test-suite/MicroBenchmarks/libs/benchmark-1.3.0/src/../include -mtls-size=48 -mcmodel=large -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -Wfloat-equal -fstrict-aliasing -Wzero-as-null-pointer-constant -Wstrict-aliasing -Wthread-safety -O0 -w -Werror=date-time -std=gnu++11 -o sysinfo.cc.o -c /home/jianghaibo/llvm-test-suite/MicroBenchmarks/libs/benchmark-1.3.0/src/sysinfo.cc
Is there any plan to support more scenarios?
Thanks!