tasks/compile.rake in webroar-0.2.2 vs tasks/compile.rake in webroar-0.2.3

- old
+ new

@@ -1,7 +1,7 @@ # WebROaR - Ruby Application Server - http://webroar.in/ -# Copyright (C) 2009 WebROaR +# Copyright (C) 2009 Goonj LLC # # This file is part of WebROaR. # # WebROaR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -100,11 +100,13 @@ else $inc_flags = Config::expand($INCFLAGS,CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote, 'arch_hdrdir' => "#$arch_hdrdir", 'top_srcdir' => $top_srcdir.quote)) end $c_flags = Config::expand($CFLAGS,CONFIG) - +if RUBY_PLATFORM =~ /darwin/ + $c_flags += " -g -O2 " +end $debug_flags = " -DL_ERROR -DL_INFO " ## Set static veriables COMPILER = CONFIG['CC'] @@ -238,32 +240,34 @@ unless $webroar_config_called webroar_config end #libraries for making executable $libs += $LIBS + ' ' + Config::expand($LIBRUBYARG_SHARED,CONFIG) - $libs += ' '+CONFIG["LIBRUBYARG"] + #$libs += ' '+CONFIG["LIBRUBYARG"] $libs += ' -lpthread ' out_file=File.join(BIN_DIR,'webroar-worker') object_files=FileList[File.join(WORKER_OBJ_DIR,'*.o'), helper_obj.keys, File.join(YAML_OBJ_DIR,'*.o')] - cmd="#{COMPILER} #$libs #{object_files} -o #{out_file}" + # -rdynamic option to get function name in stacktrace + cmd="#{COMPILER} #$libs -rdynamic #{object_files} -o #{out_file}" sh cmd end file webroar_bin do unless $webroar_config_called webroar_config end #libraries for making executable $libs += $LIBS + ' ' + Config::expand($LIBRUBYARG_SHARED,CONFIG) - $libs += ' '+CONFIG["LIBRUBYARG"] + #$libs += ' '+CONFIG["LIBRUBYARG"] $libs += ' -lpthread ' if ENV['ssl'].eql?("yes") puts "Compiling with gnutls library." $libs += ' -lgnutls ' end out_file=File.join(BIN_DIR,'webroar-head') object_files=FileList[File.join(OBJ_DIR,'*.o'),File.join(YAML_OBJ_DIR,'*.o')] - cmd="#{COMPILER} #$libs #{object_files} -o #{out_file}" + # -rdynamic option to get function name in stacktrace + cmd="#{COMPILER} #$libs -rdynamic #{object_files} -o #{out_file}" sh cmd end file webroar_bin => worker_bin task :compile => [:create_obj_dirs, webroar_bin]