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.
5 # Toolchain-related configuration that may be needed outside the context of the
6 # toolchain() rules themselves.
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/
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"
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"
30 shlib_extension = ".dll"
32 assert(false, "Platform not supported")
35 # Prefix for shared library files.