From e0ce092ddcfdad62458596132bdccdb4502dd03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Mon, 4 Jul 2011 11:17:30 -0400 Subject: [PATCH] Simplify the code a bit. --- src/comp/driver/rustc.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index fb8d35f285e..d73ca52f9e2 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -430,16 +430,11 @@ fn main(vec[str] args) { saved_out_filename, saved_out_filename + ".o"]; auto shared_cmd; - alt (sess.get_targ_cfg().os) { - case (session::os_win32) { - shared_cmd = "-shared"; - } - case (session::os_macos) { + auto os = sess.get_targ_cfg().os; + if (os == session::os_macos) { shared_cmd = "-dynamiclib"; - } - case (session::os_linux) { + } else { shared_cmd = "-shared"; - } } // Converts a library file name into a gcc -l argument