Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2642)

Unified Diff: build/toolchain/mac/BUILD.gn

Issue 1409553003: [GN] Add solink_module tool on the Mac, Win, and GCC toolchains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update win and gcc toolchains as well. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | build/toolchain/win/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 5d918d0038288004eb336d0cdf52d02c21b4bc9c..3f6ffc2400bd0dfb6f8e427a5c8e25aa00d0ecf9 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -167,6 +167,33 @@ template("mac_toolchain") {
depend_output = tocname
}
+ tool("solink_module") {
+ sofile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.so"
+ rspfile = sofile + ".rsp"
+
+ link_command = "$ld -bundle {{ldflags}} -o $sofile -Wl,-filelist,$rspfile"
+ if (is_component_build) {
+ link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}"
+ }
+ link_command += " {{solibs}} {{libs}}"
+ command = link_command
+
+ rspfile_content = "{{inputs_newline}}"
+
+ description = "SOLINK_MODULE {{output}}"
+
+ # Use this for {{output_extension}} expansions unless a target manually
+ # overrides it (in which case {{output_extension}} will be what the target
+ # specifies).
+ default_output_extension = ".so"
+
+ output_prefix = "lib"
+
+ outputs = [
+ sofile,
+ ]
+ }
+
tool("link") {
outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"
rspfile = "$outfile.rsp"
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | build/toolchain/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698