Since LLVM r326341, default EmulatedTLS mode is decided in backend according to target triple. Any front-end should pass -f[no]-emulated-tls to backend and set up ExplicitEmulatedTLS only when the flags are used.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I will upload a different fix soon.
We should set ExplicitEmulatedTLS only when -f[no-]emulated-tls flag is found at command line.
Any front-end should only pass the flag and let backend decide the default based on target.
Comment Actions
Ok, thanks. Yes, this should probably only set it if some of those flags are set here.
FWIW, clang also has got a list of targets where emulated TLS is enabled by default - could this be omitted somehow, now that LLVM can handle that on its own?
Comment Actions
Martin, thanks for finding this problem.
Please review/accept my new change if it passes your tests.
After this and D42999, the default emulated TLS mode should only be decided in
llvm/trunk/include/llvm/ADT/Triple.h hasDefaultEmulatedTLS().