diff --git a/Rakefile b/Rakefile index efbdd08d2..9c185c9f1 100644 --- a/Rakefile +++ b/Rakefile @@ -181,12 +181,15 @@ def setup_globals mocflags = $building_for[:macos] ? "-DSYS_APPLE" : $building_for[:windows] ? "-DSYS_WINDOWS" : "" + ranlibflags = $building_for[:macos] ? "-no_warning_for_no_symbols" : "" + $flags = { :cflags => cflags, :cxxflags => cxxflags, :ldflags => ldflags, :windres => windres, :moc => mocflags, + :ranlib => ranlibflags, } setup_macos_specifics if $building_for[:macos] diff --git a/rake.d/library.rb b/rake.d/library.rb index affac6560..6bb959b75 100644 --- a/rake.d/library.rb +++ b/rake.d/library.rb @@ -13,8 +13,8 @@ class Library < Target def create_specific_static file "#{@target}.a" => @objects do |t| FileUtils.rm_f t.name - runq "ar", t.name, "#{c(:AR)} rc #{t.name} #{@objects.join(" ")}" - runq "ranlib", t.name, "#{c(:RANLIB)} #{t.name}" + runq "ar", t.name, "#{c(:AR)} crS #{t.name} #{@objects.join(" ")}" + runq "ranlib", t.name, "#{c(:RANLIB)} #{$flags[:ranlib]} #{t.name}" end end