Commit 5eea716f authored by Scott Graham's avatar Scott Graham Committed by Commit Bot

GN: Fix references to lib_[dir_]prefix, which should be lib_[dir_]switch

Bug: 788007
Change-Id: I86de75ca303b66227db170021bdfd7fb50a61811
Reviewed-on: https://chromium-review.googlesource.com/786175
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518820}
parent 4bbd3580
......@@ -3064,7 +3064,7 @@
{{libs}}
Expands to the list of system libraries to link to. Each will be
prefixed by the "lib_prefix".
prefixed by the "lib_switch".
As a special case to support Mac, libraries with names ending in
".framework" will be added to the {{libs}} with "-framework" preceeding
......@@ -3177,8 +3177,8 @@
```
toolchain("my_toolchain") {
# Put these at the top to apply to all tools below.
lib_prefix = "-l"
lib_dir_prefix = "-L"
lib_switch = "-l"
lib_dir_switch = "-L"
tool("cc") {
command = "gcc {{source}} -o {{output}}"
......@@ -4733,14 +4733,14 @@
System libraries
Values not containing '/' will be treated as system library names. These
will be passed unmodified to the linker and prefixed with the
"lib_prefix" attribute of the linker tool. Generally you would set the
"lib_switch" attribute of the linker tool. Generally you would set the
"lib_dirs" so the given library is found. Your BUILD.gn file should not
specify the switch (like "-l"): this will be encoded in the "lib_prefix"
specify the switch (like "-l"): this will be encoded in the "lib_switch"
of the tool.
Apple frameworks
System libraries ending in ".framework" will be special-cased: the switch
"-framework" will be prepended instead of the lib_prefix, and the
"-framework" will be prepended instead of the lib_switch, and the
".framework" suffix will be trimmed. This is to support the way Mac links
framework dependencies.
```
......
......@@ -840,7 +840,7 @@ R"( Compiler tools have the notion of a single input and a single output, along
{{libs}}
Expands to the list of system libraries to link to. Each will be
prefixed by the "lib_prefix".
prefixed by the "lib_switch".
As a special case to support Mac, libraries with names ending in
".framework" will be added to the {{libs}} with "-framework" preceeding
......@@ -950,8 +950,8 @@ Example
toolchain("my_toolchain") {
# Put these at the top to apply to all tools below.
lib_prefix = "-l"
lib_dir_prefix = "-L"
lib_switch = "-l"
lib_dir_switch = "-L"
tool("cc") {
command = "gcc {{source}} -o {{output}}"
......
......@@ -1278,14 +1278,14 @@ Types of libs
System libraries
Values not containing '/' will be treated as system library names. These
will be passed unmodified to the linker and prefixed with the
"lib_prefix" attribute of the linker tool. Generally you would set the
"lib_switch" attribute of the linker tool. Generally you would set the
"lib_dirs" so the given library is found. Your BUILD.gn file should not
specify the switch (like "-l"): this will be encoded in the "lib_prefix"
specify the switch (like "-l"): this will be encoded in the "lib_switch"
of the tool.
Apple frameworks
System libraries ending in ".framework" will be special-cased: the switch
"-framework" will be prepended instead of the lib_prefix, and the
"-framework" will be prepended instead of the lib_switch, and the
".framework" suffix will be trimmed. This is to support the way Mac links
framework dependencies.
)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment