Chromium Code Reviews| Index: build/toolchain/toolchain.gni |
| diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7a5cc99662e80d23f64ecc9a7883ce80bceddc4a |
| --- /dev/null |
| +++ b/build/toolchain/toolchain.gni |
| @@ -0,0 +1,46 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +# Toolchain-related configuration that may be needed outside the context of the |
| +# toolchain() rules themselves. |
| + |
| +# Subdirectory within root_out_dir for shared library files. |
| +if (is_android) { |
| + # On android, use the stripped version of the library, because |
| + # applications are always fetched over the network. |
| + shlib_subdir = "lib.stripped" |
| +} else if (is_linux) { |
| + shlib_subdir = "lib" |
| +} else { |
| + # win, mac, ios, nacl |
| + shlib_subdir = "." |
| +} |
| + |
| +# Root out dir for shared library files. |
| +root_shlib_dir = root_out_dir |
| +if (shlib_subdir != ".") { |
| + root_shlib_dir += "/$shlib_subdir" |
| +} |
| + |
| +# Extension for shared library files. |
|
brettw
2015/07/30 23:17:47
Can you append "..., including the dot."
agrieve
2015/07/31 02:09:24
Done.
|
| +if (is_mac || is_ios) { |
| + shlib_extension = ".dylib" |
| +} else if (is_android && is_component_build) { |
| + # By appending .cr, we prevent name collisions with libraries already |
| + # loaded by the Android zygote. |
| + shlib_extension = ".cr.so" |
| +} else if (is_posix) { |
| + shlib_extension = ".so" |
| +} else if (is_win) { |
| + shlib_extension = ".dll" |
| +} else { |
| + assert(false, "Platform not supported") |
| +} |
| + |
| +# Prefix for shared library files. |
| +if (is_posix) { |
| + shlib_prefix = "lib" |
| +} else { |
| + shlib_prefix = "" |
| +} |