# HG changeset patch # User Adam Chlipala # Date 1259156292 18000 # Node ID 0d916892e39eb634232dfbad2d275270bc68690e # Parent d73cf02427df37e12a03b5bc1a55bcae65e28067 Exit code of 1 on compilation failure diff -r d73cf02427df -r 0d916892e39e src/compiler.sml --- a/src/compiler.sml Tue Nov 24 09:48:28 2009 -0500 +++ b/src/compiler.sml Wed Nov 25 08:38:12 2009 -0500 @@ -928,16 +928,16 @@ val link = foldl (fn (s, link) => link ^ " " ^ s) link link' in if not (OS.Process.isSuccess (OS.Process.system compile)) then - print "C compilation failed\n" + OS.Process.exit OS.Process.failure else if not (OS.Process.isSuccess (OS.Process.system link)) then - print "C linking failed\n" + OS.Process.exit OS.Process.failure else () end fun compile job = case run toChecknest job of - NONE => print "Ur compilation failed\n" + NONE => OS.Process.exit OS.Process.failure | SOME file => let val job = valOf (run (transform parseUrp "parseUrp") job) diff -r d73cf02427df -r 0d916892e39e tests/bad.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/bad.ur Wed Nov 25 08:38:12 2009 -0500 @@ -0,0 +1,1 @@ +fun main $ = 0 diff -r d73cf02427df -r 0d916892e39e tests/bad.urp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/bad.urp Wed Nov 25 08:38:12 2009 -0500 @@ -0,0 +1,2 @@ + +bad