AVR: Add predefined version AVR and emit TLS globals as regular ones (#3420)

The AVR target on LLVM and AVR-GCC does not have support for TLS, so
it is necessary to emit global variables as NotThreadLocal.
This commit is contained in:
Ernesto Castellotti 2020-05-08 22:47:10 +02:00 committed by GitHub
parent 920fe2cff7
commit c40bbbc320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View file

@ -651,6 +651,10 @@ void registerPredefinedTargetVersions() {
VersionCondition::addPredefinedGlobalIdent("AArch64");
registerPredefinedFloatABI("ARM_SoftFloat", "ARM_HardFloat", "ARM_SoftFP");
break;
case llvm::Triple::avr:
VersionCondition::addPredefinedGlobalIdent("AVR");
VersionCondition::addPredefinedGlobalIdent("D_SoftFloat");
break;
case llvm::Triple::mips:
case llvm::Triple::mipsel:
VersionCondition::addPredefinedGlobalIdent("MIPS");