| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Toolchain-related configuration that may be needed outside the context of the | 5 # Toolchain-related configuration that may be needed outside the context of the |
| 6 # toolchain() rules themselves. | 6 # toolchain() rules themselves. |
| 7 | 7 |
| 8 declare_args() { |
| 9 # Enable Link Time Optimization in optimized builds (output programs run |
| 10 # faster, but linking is up to 5-20x slower). |
| 11 # |
| 12 # TODO(pcc): Remove this flag if/when LTO is enabled in official builds. |
| 13 allow_posix_link_time_opt = false |
| 14 } |
| 15 |
| 8 # Subdirectory within root_out_dir for shared library files. | 16 # Subdirectory within root_out_dir for shared library files. |
| 9 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work | 17 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work |
| 10 # in GN until support for loadable_module() is added. | 18 # in GN until support for loadable_module() is added. |
| 11 # See: https://codereview.chromium.org/1236503002/ | 19 # See: https://codereview.chromium.org/1236503002/ |
| 12 shlib_subdir = "." | 20 shlib_subdir = "." |
| 13 | 21 |
| 14 # Root out dir for shared library files. | 22 # Root out dir for shared library files. |
| 15 root_shlib_dir = root_out_dir | 23 root_shlib_dir = root_out_dir |
| 16 if (shlib_subdir != ".") { | 24 if (shlib_subdir != ".") { |
| 17 root_shlib_dir += "/$shlib_subdir" | 25 root_shlib_dir += "/$shlib_subdir" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 48 stamp_description = "STAMP {{output}}" | 56 stamp_description = "STAMP {{output}}" |
| 49 copy_description = "COPY {{source}} {{output}}" | 57 copy_description = "COPY {{source}} {{output}}" |
| 50 if (host_os == "win") { | 58 if (host_os == "win") { |
| 51 stamp_command = "$python_path gyp-win-tool stamp {{output}}" | 59 stamp_command = "$python_path gyp-win-tool stamp {{output}}" |
| 52 copy_command = | 60 copy_command = |
| 53 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" | 61 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" |
| 54 } else { | 62 } else { |
| 55 stamp_command = "touch {{output}}" | 63 stamp_command = "touch {{output}}" |
| 56 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" | 64 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" |
| 57 } | 65 } |
| OLD | NEW |