annotate revisions.pl.in @ 945:03d7c4aac654

SWITCHED TO LLVM 2.5 ! Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel. Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple. Fixed return calling convention for complex numbers, ST and ST(1) were switched around. Added some testcases. I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 08 Feb 2009 05:26:54 +0100
parents a331ce9bc749
children d66ab756c75b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
853
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
1 #!/usr/bin/perl
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
2
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
3 use strict;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
4 use warnings;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
5 use File::stat;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
6 use Time::localtime;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
7
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
8 my $llvm_src = `perl @LLVM_CONFIG@ --src-root`;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
9
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
10 my $llvm_rev = `svnversion $llvm_src`;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
11
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
12 if ($llvm_rev =~ s/(\d+)\s+$/$1/) {
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
13 $llvm_rev = qq!#define LLVM_REV "LLVM rev.$llvm_rev"!
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
14 } else {
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
15 my $llvm_lib = `perl @LLVM_CONFIG@ --libdir`;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
16 $llvm_lib =~ s/\s+$//;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
17 $llvm_rev = ctime(stat($llvm_lib)->mtime) if (-d $llvm_lib);
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
18 $llvm_rev = qq!#include "llvm/Config/config.h"\n#define LLVM_REV PACKAGE_STRING" ($llvm_rev)"!;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
19 }
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
20
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
21 my $ldc_rev = `hg -R@PROJECT_SOURCE_DIR@ tip --template {rev}`;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
22
873
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
23 my $out = qq!#ifndef LDC_VERSIONS_H
853
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
24 #define LDC_VERSIONS_H
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
25
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
26 $llvm_rev
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
27 #define LDC_REV "rev.$ldc_rev"
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
28
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
29 #endif // LDC_VERSIONS_H\n!;
82ad6c0c601c Add Elrood's patch to output LDC and LLVM source revs.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
30
873
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
31 my $revh;
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
32 my $old = "";
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
33 open $revh, "revisions.h" and $old = join "", <$revh>;
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
34
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
35 if ($old ne $out) {
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
36 open $revh, ">revisions.h" or die "cannot create revisions.h: $!";
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
37 print $revh $out;
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
38 close $revh;
a331ce9bc749 fix unnecessary revisions.h regeneration and mars.c recompilation
elrood
parents: 853
diff changeset
39 }