Mercurial > projects > ldc
comparison dmd/mars.c @ 876:27a379f288bf
Merged DMD 1.039
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 07 Jan 2009 19:34:48 +0100 |
parents | 330f999ade44 |
children | 177afbf5297b |
comparison
equal
deleted
inserted
replaced
875:330f999ade44 | 876:27a379f288bf |
---|---|
1 // Compiler implementation of the D programming language | 1 // Compiler implementation of the D programming language |
2 // Copyright (c) 1999-2008 by Digital Mars | 2 // Copyright (c) 1999-2009 by Digital Mars |
3 // All Rights Reserved | 3 // All Rights Reserved |
4 // written by Walter Bright | 4 // written by Walter Bright |
5 // http://www.digitalmars.com | 5 // http://www.digitalmars.com |
6 // License for redistribution is by either the Artistic License | 6 // License for redistribution is by either the Artistic License |
7 // in artistic.txt, or the GNU General Public License in gnu.txt. | 7 // in artistic.txt, or the GNU General Public License in gnu.txt. |
59 obj_ext = "o"; | 59 obj_ext = "o"; |
60 #if _WIN32 | 60 #if _WIN32 |
61 obj_ext_alt = "obj"; | 61 obj_ext_alt = "obj"; |
62 #endif | 62 #endif |
63 | 63 |
64 copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen"; | 64 copyright = "Copyright (c) 1999-2009 by Digital Mars and Tomas Lindquist Olsen"; |
65 written = "written by Walter Bright and Tomas Lindquist Olsen"; | 65 written = "written by Walter Bright and Tomas Lindquist Olsen"; |
66 version = "v1.038"; | 66 version = "v1.039"; |
67 ldc_version = LDC_REV; | 67 ldc_version = LDC_REV; |
68 llvm_version = LLVM_REV; | 68 llvm_version = LLVM_REV; |
69 global.structalign = 8; | 69 global.structalign = 8; |
70 | 70 |
71 memset(¶ms, 0, sizeof(Param)); | 71 memset(¶ms, 0, sizeof(Param)); |
911 | 911 |
912 // setup version idents and tt_os for chosen target os | 912 // setup version idents and tt_os for chosen target os |
913 switch(global.params.os) | 913 switch(global.params.os) |
914 { | 914 { |
915 case OSWindows: | 915 case OSWindows: |
916 // TODO Win64 stuff! | |
916 VersionCondition::addPredefinedGlobalIdent("Windows"); | 917 VersionCondition::addPredefinedGlobalIdent("Windows"); |
917 VersionCondition::addPredefinedGlobalIdent("Win32"); | 918 VersionCondition::addPredefinedGlobalIdent("Win32"); |
918 VersionCondition::addPredefinedGlobalIdent("mingw32"); | 919 VersionCondition::addPredefinedGlobalIdent("mingw32"); |
919 break; | 920 break; |
920 | 921 |
950 // build a minimal data layout so llvm can find the target | 951 // build a minimal data layout so llvm can find the target |
951 global.params.dataLayout = global.params.isLE | 952 global.params.dataLayout = global.params.isLE |
952 ? (char*)(global.params.is64bit ? "e-p:64:64" : "e-p:32:32") | 953 ? (char*)(global.params.is64bit ? "e-p:64:64" : "e-p:32:32") |
953 : (char*)(global.params.is64bit ? "E-p:64:64" : "E-p:32:32"); | 954 : (char*)(global.params.is64bit ? "E-p:64:64" : "E-p:32:32"); |
954 Logger::println("Layout: %s", global.params.dataLayout); | 955 Logger::println("Layout: %s", global.params.dataLayout); |
956 | |
957 // added in 1.039 | |
958 if (global.params.doDocComments) | |
959 VersionCondition::addPredefinedGlobalIdent("D_Ddoc"); | |
955 | 960 |
956 // Initialization | 961 // Initialization |
957 Type::init(); | 962 Type::init(); |
958 Id::initialize(); | 963 Id::initialize(); |
959 Module::init(); | 964 Module::init(); |