[svn:parrot] r41760 - branches/detect_llvm/config/auto
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Thu Oct 8 01:53:31 UTC 2009
Author: jkeenan
Date: Thu Oct 8 01:53:31 2009
New Revision: 41760
URL: https://trac.parrot.org/parrot/changeset/41760
Log:
More rigorous testing of functional LLVM.
Modified:
branches/detect_llvm/config/auto/llvm.pm
Modified: branches/detect_llvm/config/auto/llvm.pm
==============================================================================
--- branches/detect_llvm/config/auto/llvm.pm Thu Oct 8 01:38:58 2009 (r41759)
+++ branches/detect_llvm/config/auto/llvm.pm Thu Oct 8 01:53:31 2009 (r41760)
@@ -111,7 +111,37 @@
$self->_handle_result( $conf, 0 );
}
else {
- $self->_handle_result( $conf, 1 );
+ eval {
+ system(qq{llc $bcfile -o $sfile});
+ };
+ if ( $@ or (! -e $sfile) ) {
+ print "Unable to compile program to native assembly using 'llc'\n"
+ if $verbose;
+ $self->_handle_result( $conf, 0 );
+ }
+ else {
+ eval {
+ system(qq{cc $sfile -o $nativefile});
+ };
+ if ( $@ or (! -e $nativefile) ) {
+ print "Unable to assemble native assembly into program\n"
+ if $verbose;
+ $self->_handle_result( $conf, 0 );
+ }
+ else {
+ eval {
+ $output = capture_output(qq{./$nativefile});
+ };
+ if ( $@ or ( $output !~ q/hello world/) ) {
+ print "Unable to execute native assembly program successfuly\n"
+ if $verbose;
+ $self->_handle_result( $conf, 0 );
+ }
+ else {
+ $self->_handle_result( $conf, 1 );
+ }
+ }
+ }
}
}
foreach my $f ( $bcfile, $sfile, $nativefile ) {
More information about the parrot-commits
mailing list