]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix linking with --as-needed and on Windows, patch by Yaakov Selkowitz,
authorJürg Billeter <j@bitron.ch>
Wed, 30 Jul 2008 21:31:49 +0000 (21:31 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 30 Jul 2008 21:31:49 +0000 (21:31 +0000)
2008-07-30  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodecompiler.vala:

Fix linking with --as-needed and on Windows,
patch by Yaakov Selkowitz, fixes bug 545427

svn path=/trunk/; revision=1728

ChangeLog
gobject/valaccodecompiler.vala

index 654658122ad661951b30db70c385ad4e2446e2fd..2d47988eb6dc95cb65e42ac05df4c620a94798d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-30  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodecompiler.vala:
+
+       Fix linking with --as-needed and on Windows,
+       patch by Yaakov Selkowitz, fixes bug 545427
+
 2008-07-30  Jürg Billeter  <j@bitron.ch>
 
        * vapi/glib-2.0.vapi:
index 47d6725581134bb2cb8a92f5e1810388e8f09a00..9be754c4cc4e18f2e06fe78241210af3d4d37580 100644 (file)
@@ -93,10 +93,6 @@ public class Vala.CCodeCompiler : Object {
                        }
                        cmdline += " -o " + Shell.quote (output);
                }
-               cmdline += " " + pkgflags;
-               foreach (string cc_option in cc_options) {
-                       cmdline += " " + Shell.quote (cc_option);
-               }
 
                /* make sure include files can be found if -d is used */
                if (context.directory != null && context.directory != "") {
@@ -115,6 +111,13 @@ public class Vala.CCodeCompiler : Object {
                        cmdline += " " + Shell.quote (file);
                }
 
+               // add libraries after source files to fix linking
+               // with --as-needed and on Windows
+               cmdline += " " + pkgflags;
+               foreach (string cc_option in cc_options) {
+                       cmdline += " " + Shell.quote (cc_option);
+               }
+
                try {
                        Process.spawn_command_line_sync (cmdline, null, null, out exit_status);
                        if (exit_status != 0) {