[PATCH] Clang/driver: emulated TLS mode.

Joerg Sonnenberger joerg at britannica.bec.de
Mon Jun 29 12:30:25 PDT 2015


On Mon, Jun 29, 2015 at 07:20:12PM +0000, Chih-Hung Hsieh wrote:
> This patch should keep the default clang/llvm configuration for all targets, but add the necessary -ftls-model=emulated flag for Android users that need TLS.
> Please see also the comments in the llvm bug:
> https://llvm.org/bugs/show_bug.cgi?id=23566#c4

That doesn't answer why it needs to be a new TLS model. Why can't you
lower the TLS access differently if the environment or whatever is
android? It would even be a generic TLS emulation pass that rewrites
them into the appropiate function calls. That would require no changes
to Clang at all, it seems.

Joerg



More information about the llvm-commits mailing list