| 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"
|
|
|