[llvm-commits] CVS: llvm-www/demo/index.cgi
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Nov 20 18:20:02 PST 2003
Changes in directory llvm-www/demo:
index.cgi updated: 1.5 -> 1.6
---
Log message:
Implement option to run gccld (no UI yet)
---
Diffs of the changes: (+11 -1)
Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.5 llvm-www/demo/index.cgi:1.6
--- llvm-www/demo/index.cgi:1.5 Thu Nov 20 10:26:00 2003
+++ llvm-www/demo/index.cgi Thu Nov 20 18:19:28 2003
@@ -5,7 +5,7 @@
# doing remote web JO99C compilations. (It could still be used for that
# purpose, though the two scripts have diverged somewhat.)
#
-# Last modified $Date: 2003/11/20 16:26:00 $
+# Last modified $Date: 2003/11/21 00:19:28 $
#
use CGI;
@@ -181,6 +181,8 @@
if `llvm-dis --help 2>&1` !~ /ll disassembler/;
$sanitycheckfail .= ' llvm-gcc'
if `llvm-gcc --version 2>&1` !~ /Free Software Foundation/;
+ $sanitycheckfail .= ' gccld'
+ if `gccld --help 2>&1` !~ /llvm linker for GCC/;
barf(
"The demo page is currently unavailable. [tools: ($sanitycheckfail ) failed sanity check]"
)
@@ -266,6 +268,14 @@
try_run( "llvm-gcc",
"llvm-gcc -o $bytecodeFile -c $inputFile > $outputFile 2>&1",
$outputFile );
+
+ if ( $c->param('linkopt') ) {
+ print "<p>Running link-time optimizer.</p>\n";
+ my $tmpFile = getname(".bc");
+ system("gccld --link-as-library -o=$tmpFile $outputFile 2>&1");
+ system("mv $tmpFile $outputFile");
+ }
+
my $disassemblyFile = getname(".ll");
try_run( "llvm-dis",
"llvm-dis -o=$disassemblyFile $bytecodeFile > $outputFile 2>&1",
More information about the llvm-commits
mailing list