[PATCH] D81035: [gn build] Fix link with ld.bfd and gold.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 14:22:51 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa946cb1813c2: [gn build] Fix link with ld.bfd and gold. (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81035/new/

https://reviews.llvm.org/D81035

Files:
  llvm/utils/gn/build/toolchain/BUILD.gn


Index: llvm/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/utils/gn/build/toolchain/BUILD.gn
+++ llvm/utils/gn/build/toolchain/BUILD.gn
@@ -55,10 +55,10 @@
     tool("solink") {
       outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
       if (current_os == "mac") {
-        command = "$ld -shared {{ldflags}} -o $outfile {{libs}} {{inputs}}"
+        command = "$ld -shared {{ldflags}} -o $outfile {{inputs}} {{libs}}"
         default_output_extension = ".dylib"
       } else {
-        command = "$ld -shared {{ldflags}} -Wl,-z,defs -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{libs}} {{inputs}}"
+        command = "$ld -shared {{ldflags}} -Wl,-z,defs -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}"
         default_output_extension = ".so"
       }
       description = "SOLINK $outfile"
@@ -71,10 +71,10 @@
     tool("solink_module") {
       outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
       if (current_os == "mac") {
-        command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{libs}} {{inputs}}"
+        command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{inputs}} {{libs}}"
         default_output_extension = ".dylib"
       } else {
-        command = "$ld -shared {{ldflags}} -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{libs}} {{inputs}}"
+        command = "$ld -shared {{ldflags}} -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}"
         default_output_extension = ".so"
       }
       description = "SOLINK $outfile"
@@ -86,9 +86,9 @@
     tool("link") {
       outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
       if (current_os == "mac") {
-        command = "$ld {{ldflags}} -o $outfile {{libs}} {{inputs}}"
+        command = "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}}"
       } else {
-        command = "$ld {{ldflags}} -o $outfile {{libs}} -Wl,--start-group {{inputs}} -Wl,--end-group"
+        command = "$ld {{ldflags}} -o $outfile -Wl,--start-group {{inputs}} -Wl,--end-group {{libs}}"
       }
       description = "LINK $outfile"
       outputs = [ outfile ]
@@ -245,7 +245,7 @@
     dllfile = "$outprefix{{output_extension}}"
     libfile = "$outprefix.lib"
     pdbfile = "$outprefix.pdb"
-    command = "$link /nologo /dll {{ldflags}} /out:$dllfile /implib:$libfile /pdb:$pdbfile {{libs}} {{inputs}}"
+    command = "$link /nologo /dll {{ldflags}} /out:$dllfile /implib:$libfile /pdb:$pdbfile {{inputs}} {{libs}} "
     description = "LINK $dllfile"
     link_output = libfile
     depend_output = libfile
@@ -272,7 +272,7 @@
     outprefix = "{{output_dir}}/{{target_output_name}}"
     dllfile = "$outprefix{{output_extension}}"
     pdbfile = "$outprefix.pdb"
-    command = "$link /nologo /dll {{ldflags}} /out:$dllfile /pdb:$pdbfile {{libs}} {{inputs}}"
+    command = "$link /nologo /dll {{ldflags}} /out:$dllfile /pdb:$pdbfile {{inputs}} {{libs}} "
     description = "LINK_MODULE $dllfile"
     outputs = [ dllfile ]
     lib_switch = ""
@@ -286,7 +286,7 @@
     outprefix = "{{output_dir}}/{{target_output_name}}"
     outfile = "$outprefix{{output_extension}}"
     pdbfile = "$outprefix.pdb"
-    command = "$link /nologo {{ldflags}} /out:$outfile /pdb:$pdbfile {{libs}} {{inputs}}"
+    command = "$link /nologo {{ldflags}} /out:$outfile /pdb:$pdbfile {{inputs}} {{libs}}"
     description = "LINK $outfile"
     outputs = [ outfile ]
     lib_switch = ""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81035.268306.patch
Type: text/x-patch
Size: 3659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200603/abed6391/attachment.bin>


More information about the llvm-commits mailing list