[PATCH] D56705: gn build: Make a couple of improvements to the unix toolchain.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 15 00:20:05 PST 2019
This revision was automatically updated to reflect the committed changes.
pcc marked an inline comment as done.
Closed by commit rL351167: gn build: Make a couple of improvements to the unix toolchain. (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56705?vs=181730&id=181732#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56705/new/
https://reviews.llvm.org/D56705
Files:
llvm/trunk/utils/gn/build/toolchain/BUILD.gn
Index: llvm/trunk/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/build/toolchain/BUILD.gn
+++ llvm/trunk/utils/gn/build/toolchain/BUILD.gn
@@ -39,6 +39,16 @@
]
}
+ tool("asm") {
+ depfile = "{{output}}.d"
+ command = "$cc -MMD -MF $depfile -o {{output}} -c {{source}} {{defines}} {{include_dirs}} {{asmflags}} $target_cflags"
+ depsformat = "gcc"
+ description = "ASM {{output}}"
+ outputs = [
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
+ ]
+ }
+
tool("alink") {
if (current_os == "mac") {
command = "libtool -static -no_warning_for_no_symbols {{arflags}} -o {{output}} {{inputs}}"
@@ -62,7 +72,7 @@
command = "$ld -shared {{ldflags}} -o $outfile {{libs}} {{inputs}} $target_ldflags"
default_output_extension = ".dylib"
} else {
- command = "$ld -shared {{ldflags}} -Wl,-z,defs -o $outfile {{libs}} {{inputs}} $target_ldflags"
+ command = "$ld -shared {{ldflags}} -Wl,-z,defs -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{libs}} {{inputs}} $target_ldflags"
default_output_extension = ".so"
}
description = "SOLINK $outfile"
@@ -80,7 +90,7 @@
command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{libs}} {{inputs}} $target_ldflags"
default_output_extension = ".dylib"
} else {
- command = "$ld -shared {{ldflags}} -o $outfile {{libs}} {{inputs}} $target_ldflags"
+ command = "$ld -shared {{ldflags}} -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{libs}} {{inputs}} $target_ldflags"
default_output_extension = ".so"
}
description = "SOLINK $outfile"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56705.181732.patch
Type: text/x-patch
Size: 1840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190115/f2bdbb8b/attachment.bin>
More information about the llvm-commits
mailing list