OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Toolchain-related configuration that may be needed outside the context of the |
| 6 # toolchain() rules themselves. |
| 7 |
| 8 # 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 |
| 10 # in GN until support for loadable_module() is added. |
| 11 # See: https://codereview.chromium.org/1236503002/ |
| 12 shlib_subdir = "." |
| 13 |
| 14 # Root out dir for shared library files. |
| 15 root_shlib_dir = root_out_dir |
| 16 if (shlib_subdir != ".") { |
| 17 root_shlib_dir += "/$shlib_subdir" |
| 18 } |
| 19 |
| 20 # Extension for shared library files (including leading dot). |
| 21 if (is_mac || is_ios) { |
| 22 shlib_extension = ".dylib" |
| 23 } else if (is_android && is_component_build) { |
| 24 # By appending .cr, we prevent name collisions with libraries already |
| 25 # loaded by the Android zygote. |
| 26 shlib_extension = ".cr.so" |
| 27 } else if (is_posix) { |
| 28 shlib_extension = ".so" |
| 29 } else if (is_win) { |
| 30 shlib_extension = ".dll" |
| 31 } else { |
| 32 assert(false, "Platform not supported") |
| 33 } |
| 34 |
| 35 # Prefix for shared library files. |
| 36 if (is_posix) { |
| 37 shlib_prefix = "lib" |
| 38 } else { |
| 39 shlib_prefix = "" |
| 40 } |
OLD | NEW |