File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ class TrivialMemoryManager : public RTDyldMemoryManager {
286
286
uintptr_t SlabSize = 0 ;
287
287
uintptr_t CurrentSlabOffset = 0 ;
288
288
SectionIDMap *SecIDMap = nullptr ;
289
- #if defined(__x86_64__) && defined(__ELF__)
289
+ #if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
290
290
unsigned UsedTLSStorage = 0 ;
291
291
#endif
292
292
};
@@ -350,7 +350,7 @@ uint8_t *TrivialMemoryManager::allocateDataSection(uintptr_t Size,
350
350
351
351
// In case the execution needs TLS storage, we define a very small TLS memory
352
352
// area here that will be used in allocateTLSSection().
353
- #if defined(__x86_64__) && defined(__ELF__)
353
+ #if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
354
354
extern " C" {
355
355
alignas (16 ) __attribute__((visibility(" hidden" ), tls_model(" initial-exec" ),
356
356
used)) thread_local char LLVMRTDyldTLSSpace[16];
@@ -361,7 +361,7 @@ TrivialMemoryManager::TLSSection
361
361
TrivialMemoryManager::allocateTLSSection (uintptr_t Size, unsigned Alignment,
362
362
unsigned SectionID,
363
363
StringRef SectionName) {
364
- #if defined(__x86_64__) && defined(__ELF__)
364
+ #if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
365
365
if (Size + UsedTLSStorage > sizeof (LLVMRTDyldTLSSpace)) {
366
366
return {};
367
367
}
You can’t perform that action at this time.
0 commit comments