diff options
Diffstat (limited to 'libphobos/libdruntime/gcc/sections/macho.d')
-rw-r--r-- | libphobos/libdruntime/gcc/sections/macho.d | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libphobos/libdruntime/gcc/sections/macho.d b/libphobos/libdruntime/gcc/sections/macho.d index 645c0f4..7211fa7 100644 --- a/libphobos/libdruntime/gcc/sections/macho.d +++ b/libphobos/libdruntime/gcc/sections/macho.d @@ -30,6 +30,7 @@ import core.sys.darwin.dlfcn; import core.sys.darwin.mach.dyld; import core.sys.darwin.mach.getsect; import core.sys.posix.pthread; +import rt.dmain2; import rt.minfo; import core.internal.container.array; import core.internal.container.hashtab; @@ -96,16 +97,10 @@ private: } /**** - * Boolean flag set to true while the runtime is initialized. - */ -__gshared bool _isRuntimeInitialized; - -/**** * Gets called on program startup just before GC is initialized. */ void initSections() nothrow @nogc { - _isRuntimeInitialized = true; } /*** @@ -113,7 +108,6 @@ void initSections() nothrow @nogc */ void finiSections() nothrow @nogc { - _isRuntimeInitialized = false; } alias ScanDG = void delegate(void* pbeg, void* pend) nothrow; @@ -379,7 +373,7 @@ extern(C) void _d_dso_registry(CompilerDSOData* data) } // don't initialize modules before rt_init was called - if (_isRuntimeInitialized) + if (isRuntimeInitialized()) { registerGCRanges(pdso); // rt_loadLibrary will run tls ctors, so do this only for dlopen @@ -394,7 +388,7 @@ extern(C) void _d_dso_registry(CompilerDSOData* data) *data._slot = null; // don't finalizes modules after rt_term was called (see Bugzilla 11378) - if (_isRuntimeInitialized) + if (isRuntimeInitialized()) { // rt_unloadLibrary already ran tls dtors, so do this only for dlclose immutable runTlsDtors = !_rtLoading; |