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

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

Issue 1386783003: [GN]: Support for loadable modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark comments 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.gn ('k') | tools/gn/binary_target_generator.h » ('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 b0c233a19a43f6ee20e7abb9007a845825674fdc..e2b4ad43505fec77fca2bf74f72eba52419769e4 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -119,9 +119,9 @@ template("mac_toolchain") {
rspfile = dylib + ".rsp"
# These variables are not built into GN but are helpers that implement
- # (1) linking to produce a .so, (2) extracting the symbols from that file
- # to a temporary file, (3) if the temporary file has differences from the
- # existing .TOC file, overwrite it, otherwise, don't change it.
+ # (1) linking to produce a .dylib, (2) extracting the symbols from that
+ # file to a temporary file, (3) if the temporary file has differences from
+ # the existing .TOC file, overwrite it, otherwise, don't change it.
#
# As a special case, if the library reexports symbols from other dynamic
# libraries, we always update the .TOC and skip the temporary file and
@@ -144,7 +144,7 @@ template("mac_toolchain") {
rspfile_content = "{{inputs_newline}}"
- description = "SOLINK {{output}}"
+ description = "DYLINK {{output}}"
# Use this for {{output_extension}} expansions unless a target manually
# overrides it (in which case {{output_extension}} will be what the target
@@ -168,6 +168,33 @@ template("mac_toolchain") {
depend_output = tocname
}
+ # tool("solink") {
Bons 2015/10/06 20:29:19 This will be called solink with the above changed
+ # 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 {{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.gn ('k') | tools/gn/binary_target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698