Set the EmulatedTLS option based on Triple::hasDefaultEmulatedTLS()
if the user didn't specify it; set ExplicitEmulatedTLS to true
in llvm::TargetOptions and set EmulatedTLS to Clang's
opinion of what the default or preference is.
This avoids any risk of deviance between the two.
This affects one check of getCodeGenOpts().EmulatedTLS in
shouldAssumeDSOLocal in CodeGenModule, but as that check only
is done for TT.isWindowsGNUEnvironment(), and
hasDefaultEmulatedTLS() returns false for such environments
it doesn't make any current testable difference.
Some mingw distributions carry a downstream patch, that enables
emulated TLS by default for mingw targets in hasDefaultEmulatedTLS()
- and for such cases, this patch does make a difference and fixes the
detection of emulated TLS, if it is implicitly enabled.
This is an alternative to D132848.