66 * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
77 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
88 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/target.d, _target.d)
9+ * Documentation: https://dlang.org/phobos/ddmd_target.html
10+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/ddmd/target.d
911 */
1012
1113module dmd.target ;
@@ -29,16 +31,21 @@ import dmd.root.outbuffer;
2931 */
3032struct Target
3133{
32- extern (C++ ) static __gshared int ptrsize;
33- extern (C++ ) static __gshared int realsize; // size a real consumes in memory
34- extern (C++ ) static __gshared int realpad; // 'padding' added to the CPU real size to bring it up to realsize
35- extern (C++ ) static __gshared int realalignsize; // alignment for reals
36- extern (C++ ) static __gshared bool reverseCppOverloads; // with dmc and cl, overloaded functions are grouped and in reverse order
37- extern (C++ ) static __gshared bool cppExceptions; // set if catching C++ exceptions is supported
38- extern (C++ ) static __gshared int c_longsize; // size of a C 'long' or 'unsigned long' type
39- extern (C++ ) static __gshared int c_long_doublesize; // size of a C 'long double'
40- extern (C++ ) static __gshared int classinfosize; // size of 'ClassInfo'
41- extern (C++ ) static __gshared ulong maxStaticDataSize; // maximum size of static data
34+ extern (C++ ) __gshared
35+ {
36+ int ptrsize;
37+ int realsize; // / size a real consumes in memory
38+ int realpad; // / 'padding' added to the CPU real size to bring it up to realsize
39+ int realalignsize; // / alignment for reals
40+ bool reverseCppOverloads; // / with dmc and cl, overloaded functions are grouped and in reverse order
41+ bool cppExceptions; // / set if catching C++ exceptions is supported
42+ char int64Mangle; // / mangling character for C++ int64_t
43+ char uint64Mangle; // / mangling character for C++ uint64_t
44+ int c_longsize; // / size of a C 'long' or 'unsigned long' type
45+ int c_long_doublesize; // / size of a C 'long double'
46+ int classinfosize; // / size of 'ClassInfo'
47+ ulong maxStaticDataSize; // / maximum size of static data
48+ }
4249
4350 extern (C++ ) struct FPTypeProperties (T)
4451 {
@@ -135,6 +142,9 @@ struct Target
135142
136143 cppExceptions = global.params.isLinux || global.params.isFreeBSD ||
137144 global.params.isOSX;
145+
146+ int64Mangle = global.params.isOSX ? ' x' : ' l' ;
147+ uint64Mangle = global.params.isOSX ? ' y' : ' m' ;
138148 }
139149
140150 /* *****************************
0 commit comments