[PATCH] D84219: [gn build] mac: use frameworks instead of libs where appropriate
Mark Mentovai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 21:26:31 PDT 2020
markmentovai updated this revision to Diff 279420.
markmentovai added a comment.
(full context)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84219/new/
https://reviews.llvm.org/D84219
Files:
llvm/utils/gn/build/toolchain/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
Index: llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
@@ -30,6 +30,6 @@
"dsymutil.cpp",
]
if (host_os == "mac") {
- libs = [ "CoreFoundation.framework" ]
+ frameworks = [ "CoreFoundation.framework" ]
}
}
Index: llvm/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/utils/gn/build/toolchain/BUILD.gn
+++ llvm/utils/gn/build/toolchain/BUILD.gn
@@ -73,7 +73,7 @@
tool("solink") {
outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
if (current_os == "mac") {
- command = "$ld -shared {{ldflags}} -o $outfile {{inputs}} {{libs}}"
+ command = "$ld -shared {{ldflags}} -o $outfile {{inputs}} {{libs}} {{frameworks}}"
default_output_extension = ".dylib"
} else {
command = "$ld -shared {{ldflags}} -Wl,-z,defs -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}"
@@ -89,7 +89,7 @@
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 {{inputs}} {{libs}}"
+ command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{inputs}} {{libs}} {{frameworks}}"
default_output_extension = ".dylib"
} else {
command = "$ld -shared {{ldflags}} -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}"
@@ -104,7 +104,8 @@
tool("link") {
outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
if (current_os == "mac") {
- command = "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}}"
+ command =
+ "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}} {{frameworks}}"
} else {
command = "$ld {{ldflags}} -o $outfile -Wl,--start-group {{inputs}} -Wl,--end-group {{libs}}"
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84219.279420.patch
Type: text/x-patch
Size: 2191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200721/994ff06e/attachment.bin>
More information about the llvm-commits
mailing list