]> Cypherpunks repositories - gostls13.git/commitdiff
6l: change default output name to 6.out.exe on windows
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 12 Jul 2011 04:22:48 +0000 (14:22 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 12 Jul 2011 04:22:48 +0000 (14:22 +1000)
R=golang-dev, vcc.163
CC=golang-dev
https://golang.org/cl/4670049

src/cmd/6l/obj.c

index e3191bb4dc075ebc85abfccf14f11b14ec1de1c0..71649473d2f0720e5547c7ebcccfb99d4719c683 100644 (file)
@@ -84,7 +84,7 @@ main(int argc, char *argv[])
        listinit();
        memset(debug, 0, sizeof(debug));
        nerrors = 0;
-       outfile = "6.out";
+       outfile = nil;
        HEADTYPE = -1;
        INITTEXT = -1;
        INITDAT = -1;
@@ -134,11 +134,20 @@ main(int argc, char *argv[])
        if(argc != 1)
                usage();
 
-       libinit();
+       mywhatsys();    // get goos
 
        if(HEADTYPE == -1)
                HEADTYPE = headtype(goos);
 
+       if(outfile == nil) {
+               if(HEADTYPE == Hwindows)
+                       outfile = "6.out.exe";
+               else
+                       outfile = "6.out";
+       }
+
+       libinit();
+
        switch(HEADTYPE) {
        default:
                diag("unknown -H option");