Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2811

Show
Ignore:
Timestamp:
11/08/07 15:54:43 (10 months ago)
Author:
sean
Message:

Reformatted library names to better support parallel installation with Phobos, multiple compilers, etc. So far, the DMD runtime has been renamed, as have all the other supplemental libraries for Win32 and Posix. The Win32 build and installation programs have been changed as well. This leaves the Posix build and installation programs, and potentially the GDC runtime or other relevant GDC scripts and code (if it is possible to have GDC link something other than libgphobos.a by default).

Here is a brief description of the new naming scheme using DMD/Win32 library names as an example:

dtango-rt-dmd.lib rt = runtime
dtango-gc-basic.lib gc = garbage collector
dtango-cc-tango.lib cc = core components


dtango-base-dmd.lib Combination of the above three

dtango-user-tango.lib Everything under /tango plus essential /std

(ie. std.intrinsic, std.stdarg)

dtango-arch-win32.lib Supplemental library for Win32 support

(was usergdi32.lib)

So we could also have dtango-user-phobos.lib as a built-in version of Tangobos.

The "-d" suffix will likely be reserved for debug builds.

On DMD/Win32, the new default install publish three libraries:

dtango-base-dmd.lib
dtango-user-tango.lib
dtango-arch-win32.lib

This new naming scheme requires the use of -defaultlib with DMD. dtango-arch-win32.lib is implicitly linked so there is no need to add it to sc.ini.

As usual, please test these changes on other platforms and inform me of any errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/install/windows/build_tango.d

    r2607 r2811  
    1919        path = args[1] ~ "\\tango"; 
    2020 
    21     outf.write ("-c -n -p256\ntango.lib\n"); 
     21    outf.write ("-c -n -p256\ndtango-user-tango.lib\n"); 
    2222    foreach(file; scan( path, ".d" ).files ) 
    2323    { 
  • trunk/install/windows/install_dmd.d

    r2465 r2811  
    5252    if( uninst ) 
    5353    { 
    54         restoreFile( libPath.file( "phobos.lib" ) ); 
    5554        restoreFile( binPath.file( "sc.ini" ) ); 
    56         removeFile( libPath.file( "tango.lib" ) ); 
    57         removeFile( libPath.file( "usergdi32.lib" ) ); 
     55        removeFile( libPath.file( "dtango-user-tango.lib" ) ); 
     56        removeFile( libPath.file( "dtango-arch-win32.lib" ) ); 
     57        removeFile( libPath.file( "dtango-base-dmd.lib" ) ); 
    5858 
    5959        removeFile( impPath.file( "object.di" ) ); 
     
    7070        copyFile( impPath.file( "object.di" ), "..\\" ); 
    7171 
    72         if( !prefix ) 
    73             backupFile( libPath.file( "phobos.lib" ) ); 
    74         scope(failure) 
    75         { 
    76             if( !prefix ) 
    77                 restoreFile( libPath.file( "phobos.lib" ) ); 
    78         } 
    79         copyFile( libPath.file( "phobos.lib" ), ".\\" ); 
    80         copyFile( libPath.file( "tango.lib" ), ".\\" ); 
    81         copyFile( libPath.file( "usergdi32.lib" ), ".\\" ); 
     72        copyFile( libPath.file( "dtango-user-tango.lib" ), ".\\" ); 
     73        copyFile( libPath.file( "dtango-arch-win32.lib" ), ".\\" ); 
     74        copyFile( libPath.file( "dtango-base-dmd.lib" ), ".\\" ); 
    8275 
    8376        backupFile( binPath.file( "sc.ini" ) ); 
     
    222215           "[Environment]\n" 
    223216           "LIB=\"" ~ libPath ~ "\"\n" 
    224            "DFLAGS=\"-I" ~ impPath ~ "\" -version=Tango -L+tango.lib\n" 
     217           "DFLAGS=\"-I" ~ impPath ~ "\" -version=Tango -defaultlib=dtango-base-dmd.lib -L+dtango-user-tango.lib\n" 
    225218           "LINKCMD=%@P%\\..\\..\\dm\\bin\\link.exe\n"; 
    226219} 
  • trunk/lib/common/tango/posix.mak

    r2628 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=libdtango-cc-tango.a 
     14LIB_MASK=libdtango-cc-tango*.a 
    1215 
    1316CP=cp -f 
     
    99102###################################################### 
    100103 
    101 tango.lib : libtango.a 
     104tango.lib : $(LIB_TARGET) 
    102105 
    103 libtango.a : $(ALL_OBJS) 
     106$(LIB_TARGET) : $(ALL_OBJS) 
    104107    $(RM) $@ 
    105108    $(LC) $@ $(ALL_OBJS) 
     
    121124    $(RM) $(ALL_OBJS) 
    122125    $(RM) $(ALL_DOCS) 
    123     find . -name "libtango*.a" | xargs $(RM) 
     126    find . -name "$(LIB_MASK)" | xargs $(RM) 
    124127 
    125128install : 
     
    129132    find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \; 
    130133    $(MD) $(LIB_DEST) 
    131     find . -name "libtango*.a" -exec cp -f {} $(LIB_DEST)/{} \; 
     134    find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \; 
  • trunk/lib/common/tango/win32.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=dtango-cc-tango.lib 
     14LIB_MASK=dtango-cc-tango*.lib 
    1215 
    1316CP=xcopy /y 
     
    9194###################################################### 
    9295 
    93 tango.lib : $(ALL_OBJS) 
     96tango.lib : $(LIB_TARGET) 
     97 
     98$(LIB_TARGET) : $(ALL_OBJS) 
    9499    $(RM) $@ 
    95100    $(LC) -c -n $@ $(ALL_OBJS) 
     
    111116    $(RM) $(ALL_OBJS) 
    112117    $(RM) $(ALL_DOCS) 
    113     $(RM) tango*.lib 
     118    $(RM) $(LIB_MASK) 
    114119 
    115120install : 
     
    119124    $(CP) /s *.html $(DOC_DEST)\. 
    120125    $(MD) $(LIB_DEST) 
    121     $(CP) tango*.lib $(LIB_DEST)\. 
     126    $(CP) $(LIB_MASK) $(LIB_DEST)\. 
  • trunk/lib/compiler/dmd/dmain2.d

    r2575 r2811  
    2525    extern (Windows) export int WideCharToMultiByte(uint, uint, wchar_t*, int, char*, int, char*, int); 
    2626    pragma(lib, "shell32.lib");   // needed for CommandLineToArgvW 
    27     pragma(lib, "usergdi32.lib"); // links Tango's Win32 library to reduce EXE size 
     27    pragma(lib, "dtango-arch-win32.lib"); // links Tango's Win32 library to reduce EXE size 
    2828} 
    2929 
  • trunk/lib/compiler/dmd/posix.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=libdtango-rt-dmd.a 
     14LIB_MASK=libdtango-rt-dmd*.a 
    1215 
    1316CP=cp -f 
     
    148151###################################################### 
    149152 
    150 dmd.lib : libdmd.a 
     153dmd.lib : $(LIB_TARGET) 
    151154 
    152 libdmd.a : $(ALL_OBJS) 
     155$(LIB_TARGET) : $(ALL_OBJS) 
    153156    $(RM) $@ 
    154157    $(LC) $@ $(ALL_OBJS) 
     
    163166    $(RM) $(ALL_OBJS) 
    164167    $(RM) $(ALL_DOCS) 
    165     $(RM) libdmd*.a 
     168    $(RM) $(LIB_MASK) 
    166169 
    167170install : 
    168171    $(MD) $(LIB_DEST) 
    169     $(CP) libdmd*.a $(LIB_DEST)/. 
     172    $(CP) $(LIB_MASK) $(LIB_DEST)/. 
  • trunk/lib/compiler/dmd/win32.mak

    r1968 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=dtango-rt-dmd.lib 
     14LIB_MASK=dtango-rt-dmd*.lib 
    1215 
    1316CP=xcopy /y 
     
    138141###################################################### 
    139142 
    140 dmd.lib : $(ALL_OBJS) 
     143dmd.lib : $(LIB_TARGET) 
     144 
     145$(LIB_TARGET) : $(ALL_OBJS) 
    141146    $(RM) $@ 
    142147    $(LC) -c -n $@ $(ALL_OBJS) minit.obj 
     
    151156    $(RM) $(ALL_OBJS) 
    152157    $(RM) $(ALL_DOCS) 
    153     $(RM) dmd*.lib 
     158    $(RM) $(LIB_MASK) 
    154159 
    155160install : 
    156161    $(MD) $(LIB_DEST) 
    157     $(CP) dmd*.lib $(LIB_DEST)\. 
     162    $(CP) $(LIB_MASK) $(LIB_DEST)\. 
  • trunk/lib/dmd-posix.mak

    r2465 r2811  
    1 # Makefile to build D runtime library libphobos.a for Linux 
     1# Makefile to build D runtime library libdtango-base-dmd.a for Linux 
    22# Designed to work with GNU make 
    33# Targets: 
     
    55#       Same as make all 
    66#   make lib 
    7 #       Build libphobos.a 
     7#       Build libdtango-base-dmd.a 
    88#   make doc 
    99#       Generate documentation 
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=libdtango-base-dmd.a 
     14LIB_MASK=libdtango-base-dmd*.a 
     15 
     16DIR_CC=./common/tango 
     17DIR_RT=./compiler/dmd 
     18DIR_GC=./gc/basic 
    1219 
    1320CP=cp -f 
     
    3643 
    3744lib : $(ALL_OBJS) 
    38     make -C compiler/dmd -fposix.mak lib 
    39     make -C gc/basic -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
    40     make -C common/tango -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
     45    make -C $(DIR_CC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
     46    make -C $(DIR_RT) -fposix.mak lib 
     47    make -C $(DIR_GC) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
    4148    find . -name "libphobos*.a" | xargs $(RM) 
    42     $(LC) libphobos.a `find ./compiler/dmd -name "*.o" | xargs echo` 
    43     $(LC) libphobos.a `find ./gc/basic -name "*.o" | xargs echo` 
    44     $(LC) libphobos.a `find ./common/tango -name "*.o" | xargs echo` 
     49    $(LC) $(LIB_TARGET) `find $(DIR_CC) -name "*.o" | xargs echo` 
     50    $(LC) $(LIB_TARGET) `find $(DIR_RT) -name "*.o" | xargs echo` 
     51    $(LC) $(LIB_TARGET) `find $(DIR_GC) -name "*.o" | xargs echo` 
    4552 
    4653doc : $(ALL_DOCS) 
    47     make -C compiler/dmd -fposix.mak doc 
    48     make -C gc/basic -fposix.mak doc 
    49     make -C common/tango -fposix.mak doc 
     54    make -C $(DIR_CC) -fposix.mak doc 
     55    make -C $(DIR_RT) -fposix.mak doc 
     56    make -C $(DIR_GC) -fposix.mak doc 
    5057 
    5158###################################################### 
     
    5562    $(RM) $(ALL_OBJS) 
    5663    $(RM) $(ALL_DOCS) 
    57     make -C compiler/dmd -fposix.mak clean 
    58     make -C gc/basic -fposix.mak clean 
    59     make -C common/tango -fposix.mak clean 
    60 #   $(RM) libphobos*.a 
     64    make -C $(DIR_CC) -fposix.mak clean 
     65    make -C $(DIR_RT) -fposix.mak clean 
     66    make -C $(DIR_GC) -fposix.mak clean 
     67#   $(RM) $(LIB_MASK) 
    6168 
    6269install : 
    63     make -C compiler/dmd -fposix.mak install 
    64     make -C gc/basic -fposix.mak install 
    65     make -C common/tango -fposix.mak install 
    66 #   $(CP) libphobos*.a $(LIB_DEST)/. 
     70    make -C $(DIR_CC) -fposix.mak install 
     71    make -C $(DIR_RT) -fposix.mak install 
     72    make -C $(DIR_GC) -fposix.mak install 
     73#   $(CP) $(LIB_MASK) $(LIB_DEST)/. 
  • trunk/lib/dmd-win32.mak

    r1922 r2811  
    1 # Makefile to build D runtime library phobos.lib for Win32 
     1# Makefile to build D runtime library dtango-base-dmd.lib for Win32 
    22# Designed to work with DigitalMars make 
    33# Targets: 
     
    55#       Same as make all 
    66#   make lib 
    7 #       Build phobos.lib 
     7#       Build dtango-base-dmd.lib 
    88#   make doc 
    99#       Generate documentation 
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=dtango-base-dmd.lib 
     14LIB_MASK=dtango-base-dmd*.lib 
     15 
     16DIR_CC=common\tango 
     17DIR_RT=compiler\dmd 
     18DIR_GC=gc\basic 
     19 
     20LIB_CC=$(DIR_CC)\dtango-cc-tango.lib 
     21LIB_RT=$(DIR_RT)\dtango-rt-dmd.lib 
     22LIB_GC=$(DIR_GC)\dtango-gc-basic.lib 
    1223 
    1324CP=xcopy /y 
     
    3647 
    3748lib : $(ALL_OBJS) 
    38     cd compiler\dmd 
     49    cd $(DIR_CC) 
     50    make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
     51    cd ..\.. 
     52    cd $(DIR_RT) 
    3953    make -fwin32.mak lib 
    4054    cd ..\.. 
    41     cd gc\basic 
    42     make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
    43     cd ..\.. 
    44     cd common\tango 
     55    cd $(DIR_GC) 
    4556    make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 
    4657    cd ..\.. 
    4758    $(RM) phobos*.lib 
    48     $(LC) -c -n phobos.lib common\tango\tango.lib compiler\dmd\dmd.lib gc\basic\basic.lib 
     59    $(LC) -c -n $(LIB_TARGET) $(LIB_CC) $(LIB_RT) $(LIB_GC) 
    4960 
    5061doc : $(ALL_DOCS) 
    51     cd compiler\dmd 
     62    cd $(DIR_CC) 
    5263    make -fwin32.mak doc 
    5364    cd ..\.. 
    54     cd gc\basic 
     65    cd $(DIR_RT) 
    5566    make -fwin32.mak doc 
    5667    cd ..\.. 
    57     cd common\tango 
     68    cd $(DIR_GC) 
    5869    make -fwin32.mak doc 
    5970    cd ..\.. 
     
    6576    $(RM) $(ALL_OBJS) 
    6677    $(RM) $(ALL_DOCS) 
    67     cd compiler\dmd 
     78    cd $(DIR_CC) 
    6879    make -fwin32.mak clean 
    6980    cd ..\.. 
    70     cd gc\basic 
     81    cd $(DIR_RT) 
    7182    make -fwin32.mak clean 
    7283    cd ..\.. 
    73     cd common\tango 
     84    cd $(DIR_GC) 
    7485    make -fwin32.mak clean 
    7586    cd ..\.. 
    76 #   $(RM) phobos*.lib 
     87#   $(RM) $(LIB_MASK) 
    7788 
    7889install : 
    79     cd compiler\dmd 
     90    cd $(DIR_CC) 
    8091    make -fwin32.mak install 
    8192    cd ..\.. 
    82     cd gc\basic 
     93    cd $(DIR_RT) 
    8394    make -fwin32.mak install 
    8495    cd ..\.. 
    85     cd common\tango 
     96    cd $(DIR_GC) 
    8697    make -fwin32.mak install 
    8798    cd ..\.. 
    88 #   $(CP) phobos*.lib $(LIB_DEST)\. 
     99#   $(CP) $(LIB_MASK) $(LIB_DEST)\. 
  • trunk/lib/gc/basic/posix.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=libdtango-gc-basic.a 
     14LIB_MASK=libdtango-gc-basic*.a 
    1215 
    1316CP=cp -f 
     
    7881###################################################### 
    7982 
    80 basic.lib : libbasic.a 
     83basic.lib : $(LIB_TARGET) 
    8184 
    82 libbasic.a : $(ALL_OBJS) 
     85$(LIB_TARGET) : $(ALL_OBJS) 
    8386    $(RM) $@ 
    8487    $(LC) $@ $(ALL_OBJS) 
     
    9396    $(RM) $(ALL_OBJS) 
    9497    $(RM) $(ALL_DOCS) 
    95     $(RM) libbasic*.a 
     98    $(RM) $(LIB_MASK) 
    9699 
    97100install : 
    98101    $(MD) $(LIB_DEST) 
    99     $(CP) libbasic*.a $(LIB_DEST)/. 
     102    $(CP) $(LIB_MASK) $(LIB_DEST)/. 
  • trunk/lib/gc/basic/win32.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=dtango-gc-basic.lib 
     14LIB_MASK=dtango-gc-basic*.lib 
    1215 
    1316CP=xcopy /y 
     
    7578###################################################### 
    7679 
    77 basic.lib : $(ALL_OBJS) 
     80basic.lib : $(LIB_TARGET) 
     81 
     82$(LIB_TARGET) : $(ALL_OBJS) 
    7883    $(RM) $@ 
    7984    $(LC) -c -n $@ $(ALL_OBJS) 
     
    8893    $(RM) $(ALL_OBJS) 
    8994    $(RM) $(ALL_DOCS) 
    90     $(RM) basic*.lib 
     95    $(RM) $(LIB_MASK) 
    9196 
    9297install : 
    9398    $(MD) $(LIB_DEST) 
    94     $(CP) basic*.lib $(LIB_DEST)\. 
     99    $(CP) $(LIB_MASK) $(LIB_DEST)\. 
  • trunk/lib/gc/stub/posix.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=libdtango-gc-stub.a 
     14LIB_MASK=libdtango-gc-stub*.a 
    1215 
    1316CP=cp -f 
     
    7477###################################################### 
    7578 
    76 stub.lib : libstub.a 
     79stub.lib : $(LIB_TARGET) 
    7780 
    78 libstub.a : $(ALL_OBJS) 
     81$(LIB_TARGET) : $(ALL_OBJS) 
    7982    $(RM) $@ 
    8083    $(LC) $@ $(ALL_OBJS) 
     
    8992    $(RM) $(ALL_OBJS) 
    9093    $(RM) $(ALL_DOCS) 
    91     $(RM) libstub*.a 
     94    $(RM) $(LIB_MASK) 
    9295 
    9396install : 
    9497    $(MD) $(LIB_DEST) 
    95     $(CP) libstub*.a $(LIB_DEST)/. 
     98    $(CP) $(LIB_MASK) $(LIB_DEST)/. 
  • trunk/lib/gc/stub/win32.mak

    r2465 r2811  
    1010#   make clean 
    1111#       Delete unneeded files created by build process 
     12 
     13LIB_TARGET=dtango-gc-stub.lib 
     14LIB_MASK=dtango-gc-stub*.lib 
    1215 
    1316CP=xcopy /y 
     
    7174###################################################### 
    7275 
    73 stub.lib : $(ALL_OBJS) 
     76stub.lib : $(LIB_TARGET) 
     77 
     78$(LIB_TARGET) : $(ALL_OBJS) 
    7479    $(RM) $@ 
    7580    $(LC) -c -n $@ $(ALL_OBJS) 
     
    8489    $(RM) $(ALL_OBJS) 
    8590    $(RM) $(ALL_DOCS) 
    86     $(RM) stub*.lib 
     91    $(RM) $(LIB_MASK) 
    8792 
    8893install : 
    8994    $(MD) $(LIB_DEST) 
    90     $(CP) stub*.lib $(LIB_DEST)\. 
     95    $(CP) $(LIB_MASK) $(LIB_DEST)\.